Hi All,
I am working with the MSVAD from the Win XP DDK. What I'd like to do
is to share the buffer "m_pDataBuffer" (non-paged pool) with the
user-space because I'd like to do some further processing on the
captured data in user space. I have done some research and there's a
few ways:
1) Use DeviceIoControl and use METHOD_IN_DIRECT or METHOD_OUT_DIRECT.
2) Mapping kernel memory to user memory.
3) Use Shared Memory Object Method (memory-mapped file backed by the
paging file)
In case of MSVAD, I just don't see how I can use method 1 because this
is a "passive" driver and I see no code to handle IOCTLs.
Method 2 is ok but you have to call MmMapLockedPagesSpecifyCache() from
the context of the process that will be using the mapping. I am not
sure that this will work for MSVAD because the app will be run after
the driver is loaded and the context will be arbitrary.
Method 3 is not recommended by MS because "the scope of the address is
limited to the process in which the object is mapped, and it cannot be
accessed in a DPC or ISR."
Ref: http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q191840
I am not sure if Method 3 effects the MSVAD driver. Can anyone explain
how to use this method to give user-space access?
Does anyone know how else I can map "m_pDataBuffer" to user-space, with
MSVAD in particular??
The stuff I have read references real device drivers and things get
muddy when you are using MSVAD because it is a virtual device driver.
Any help appreciated.
Regards,
James