Prev: WdfUsbTargetDeviceGetInterface fails
Next: GetJob inside Port Monitor returns different type of pMachineName
From: Leafbanana on 20 Jan 2010 04:48 I'm porting a WDM upper filter driver to KMDF version. I have two questions about data accessing in a completion routine. 1. In the completion routine of my WDM upper filter driver, it was able to retrieve data from Irp->AssociatedIrp.SystemBuffer( The IRP is using Method Neither I/O, and the data was set by function driver). How to do this for my KMDF driver? 2. In the completion routine of my WDM upper filter driver, it was able to retrieve data by calling MmGetSystemAddressForMdlSafe(Irp->MdlAddress, NormalPagePriority)( The IRP is using Method Neither I/O, and the MDL was set by function driver). How to do this for my KMDF driver? Thanks in advance.
From: Scott Noone on 20 Jan 2010 10:31
See the WdfRequestRetrieveXxx functions, which are typically used to access the buffers of a WDFREQUEST. It sounds like you might have slightly unusual requirements though, so you might also want to look at just using WdfRequestWdmGetIrp. This will give you access to the underlying IRP of the WDFREQUEST and you can get the buffers just as you did in WDM. -scott -- Scott Noone Consulting Associate OSR Open Systems Resources, Inc. http://www.osronline.com "Leafbanana" <Leafbanana(a)discussions.microsoft.com> wrote in message news:AC01E5EF-57F2-48F8-A647-6F0AFF733035(a)microsoft.com... > I'm porting a WDM upper filter driver to KMDF version. I have two > questions > about data accessing in a completion routine. > > 1. In the completion routine of my WDM upper filter driver, it was able to > retrieve data from Irp->AssociatedIrp.SystemBuffer( The IRP is using > Method > Neither I/O, and the data was set by function driver). How to do this for > my > KMDF driver? > > 2. In the completion routine of my WDM upper filter driver, it was able to > retrieve data by calling MmGetSystemAddressForMdlSafe(Irp->MdlAddress, > NormalPagePriority)( The IRP is using Method Neither I/O, and the MDL was > set > by function driver). How to do this for my KMDF driver? > > Thanks in advance. |