[Applies to KMDF and UMDF]

The WDF_IO_TARGET_OPEN_TYPE enumeration specifies how a driver identifies a remote I/O target when the driver calls WdfIoTargetOpen.


typedef enum _WDF_IO_TARGET_OPEN_TYPE {


WdfIoTargetOpenUndefined Reserved for system use.
WdfIoTargetOpenUseExistingDevice This value is supported by KMDF only.

The driver is identifying a remote I/O target by supplying a pointer to a Windows Driver Model (WDM) DEVICE_OBJECT structure.
WdfIoTargetOpenByName The driver is opening a remote I/O target by supplying a Unicode name string that represents an object name. This name can identify a device, file, or device interface.
WdfIoTargetOpenReopen The driver is reopening a remote I/O target after previously calling WdfIoTargetCloseForQueryRemove. For more information, see the following Remarks section.
WdfIoTargetOpenLocalTargetByFile This value is supported by UMDF only.

UMDF The driver is opening a file handle that represents the lower stack (just like a local target), so that it can send a driver-created request down to the lower stack. A UMDF driver specifies this value when it calls WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_FILE.


The WDF_IO_TARGET_OPEN_TYPE enumeration is used in the Type member of the WDF_IO_TARGET_OPEN_PARAMS structure.

The driver can specify WdfIoTargetOpenReopen only if it specified WdfIoTargetOpenByName when it originally opened the remote I/O target.

If WdfIoTargetOpenReopen is set, the framework ignores all other members of the WDF_IO_TARGET_OPEN_PARAMS structure and uses the values that the driver specified when it originally called WdfIoTargetOpen to open a remote I/O target.

By default (unless the driver specifies UmdfFileObjectPolicy=AllowNullAndUnknownFileObjects in its INF file), UMDF doesn’t allow processing of I/O requests that are not associated with a file object. Also, some driver stacks, such as HIDclass-enumerated collection PDOs, fail requests that have no associated file object.

Unlike app-created requests, driver-created requests sent to a local I/O target have no associated file object. As a result, the framework or the lower driver might fail those requests.

In this situation, you can use WdfIoTargetOpenLocalTargetByFile to cause driver-created requests sent to a local target to be associated with the file object corresponding to that target.


Minimum KMDF version 1.0
Minimum UMDF version 2.0
Header wdfiotarget.h (include Wdf.h)

See also