How do I declare memory for use in an application and a driver
I want declare a pointer in the app, "int *pData", then call some function so that the driver will allocate the necessary memory, pointed to by *pData, which can be accessed by both the driver and the app.
I'm trying to port a Linux driver and Linux app. The Linux app is using mmap() function. Is there a Microsoft equivalent
Thanks

Memory: App - Driver
MW200675
Hi!
I would propose the following:
1) Specific to usage of DMA in drivers: http://msdn.microsoft.com/library/default.asp url=/library/en-us/kmarch/hh/kmarch/IputOput_1a9532bd-cec6-48ef-9c33-b732c8cd2135.xml.asp
2) General information on drivers: http://msdn.microsoft.com/library/default.asp url=/library/en-us/Kernel_d/hh/Kernel_d/kerdg_a997c77d-f70b-412d-bef9-cb87ecc0aae5.xml.asp
Hope this helps,
Roman Barsky
hcNat
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dngenlib/html/msdn_manamemo.asp
Hope this helps
morten44
The hardware will be using DMA to continually transfer video data. So the driver will be using the DMA operation AllocateCommonBuffer() to allocate non-continuous pages of memory which can be accessed by the driver and the hardware. These pages will be collected in a fragment table which will contain pointers to the actual memory pages.
In the driver, the pointer to the fragment table is also allocated using AllocateCommonBuffer(), because it needs to be DMA accessible. I want to be able to access this pointer from an application.
From what I can tell I can't use both AllocateCommonBuffer() and the MMF functions for the same piece of DMA memory.