IWDFDevice2::GetDeviceStackIoTypePreference method (wudfddi.h)
[Warning: UMDF 2 is the latest version of UMDF and supersedes UMDF 1. All new UMDF drivers should be written using UMDF 2. No new features are being added to UMDF 1 and there is limited support for UMDF 1 on newer versions of Windows 10. Universal Windows drivers must use UMDF 2. For more info, see Getting Started with UMDF.]
The GetDeviceStackIoTypePreference method retrieves the buffer access methods that the framework is using for a device.
Syntax
void GetDeviceStackIoTypePreference(
[out] WDF_DEVICE_IO_TYPE *ReadWritePreference,
[out] WDF_DEVICE_IO_TYPE *IoControlPreference
);
Parameters
[out] ReadWritePreference
A pointer to a driver-allocated location that receives a WDF_DEVICE_IO_TYPE-typed value. This value identifies the buffer access method that the framework is using for a device's read and write requests.
[out] IoControlPreference
A pointer to a driver-allocated location that receives a WDF_DEVICE_IO_TYPE-typed value. This value that identifies the buffer access method that the framework is using for a device's I/O control requests.
Return value
None
Remarks
If your driver calls GetDeviceStackIoTypePreference before the PnP manager has loaded all of the device's drivers, the values that GetDeviceStackIoTypePreference retrieves might not be the values that it actually uses.
For more information about how the framework chooses a buffer access method, see How UMDF Chooses a Buffer Access Method for an I/O Request.
Examples
The following code example retrieves the buffer access methods that the framework is using for a device.
WDF_DEVICE_IO_TYPE ReadWriteAccessMethod;
WDF_DEVICE_IO_TYPE IoControlAccessMethod;
Device2->GetDeviceStackIoTypePreference(&ReadWriteAccessMethod,
&IoControlAccessMethod);
Requirements
Requirement | Value |
---|---|
End of support | Unavailable in UMDF 2.0 and later. |
Target Platform | Desktop |
Minimum UMDF version | 1.9 |
Header | wudfddi.h (include Wudfddi.h) |
DLL | WUDFx.dll |