Dear All,
My driver is allocating a range of memory.
This memory can be accessed in the driver from any context, user mode
(ioctls) but also in dpcs (timer any...).
At the stage of my developpment, I shared it with user mode by mapping it in
each user space needed it (in an ioctl). It works very well.
Since I know this is not recommended, I'm planning to migrate using sections
now.
I manged to create a named section in kernel mode and opening and mapping it
in user user mode. This was ok.
What I don't understand is what should I do to write some data through the
section when in the context of a dpc for ex? I can't beleive I should map a
view of the section using the NtCurrentProcess (or PsGetCurrentProcessId).
And even if I should do this, should I ensure the user mode process has
already read the shared memory before unmapping the view of the section and
exiting the dpc....?
Many thanks in advance,
Francois.