I’m confused about how to access buffers under KMDF for METHOD_XX_DIRECT.
My understanding is that with METHOD_XX_DIRECT, you have a small ‘control buffer’ already mapped to kernel space as Irp->AssociatedIrp.SystemBuffer, and a (potentially) large buffer sitting in an MDL at Irp->MdlAddress which the driver can map if required. According to this table:
http://msdn.microsoft.com/en-us/library/windows/hardware/gg583866(v=vs.85).aspx
under the heading “Buffers for IRP_MJ_DEVICE_CONTROL Requests”, I can’t see how I could get SystemBuffer, unless I call WdfRequestRetrieveInputWdmMdl and then get the system address from that. Unless I’m supposed to just go and get it from the IRP myself?
Is there a table or something that explains more clearly for METHOD_XX_DIRECT IOCTLS which WdfRetrieveXxx routine gets what?
Thanks
James