Article 12321 of comp.os.ms-windows.programmer.nt.kernel-mode: Hello, I'm writing an NT Device Driver for a PCI Bus Master device that supports DMA through a PLX 9080 interface chip. The driver supports IOCTL's from a user mode application. I intend to have the user mode application allocate a buffer and send the buffer to the driver via DeviceIoControl. The buffer will be written to via DMA at a rate of about 1MB/second. I need to be able to write into the buffer at any point in time. Therefore, this buffer must be accessible to the driver at all times (outside the thread context of user application that gives the driver the buffer). I believe the following should give me the results I'm looking for, but it doesn't work quite right.: IoAllocateMdl() to create an MDL for use by the driver independent of any IRP. MmProbeAndLockPages() with the allocated MDL from IoAllocateMdl. MmMapLockedPages() with the MDL that now has locked pages. MmGetSystemAddressForMdl() with the MDL that now has locked pages. MmGetPhysicalAddress() with the system address returned by MmGetSystemAddressForMdl. The MDL, Virtual Address, System Address, and Physical Address are kept in the DeviceExtension. Later, the device interrupts the driver telling it that acquired data needs to be transferred. The driver then DMA's the device memory contents to the user buffer residing at the physical address acquired in the steps above. In the physical memory (for the user buffer) everything shows up correctly. Although the physical memory (for the user buffer) contains the DMA'd data only pieces of the data show up in the application buffer. Why? I'm in DIRE need of an answer to this problem. Thanks In Advance! -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet