WDF_IO_TARGET_OPEN_PARAMS_INIT_OPEN_BY_FILE
WDF_IO_TARGET_PURGE_IO_ACTION
WdfIoTargetPurge method
展開 最小化

WdfIoTargetWdmGetTargetDeviceObject メソッド

The WdfIoTargetWdmGetTargetDeviceObject method returns a pointer to the Windows Driver Model (WDM) device object that is associated with a specified local or remote I/O target.

構文

PDEVICE_OBJECT WdfIoTargetWdmGetTargetDeviceObject(
  [in]  WDFIOTARGET IoTarget
);

パラメーター

IoTarget [in]

A handle to a local or remote I/O target object that was obtained from a previous call to WdfDeviceGetIoTarget or WdfIoTargetCreate or from a method that a specialized I/O target supplies.

戻り値

WdfIoTargetWdmGetTargetDeviceObject returns a pointer to a WDM DEVICE_OBJECT structure.

A bug check occurs if the driver supplies an invalid object handle.

解説

Most framework-based drivers do not need to access an I/O target's WDM device object.

The pointer that the WdfIoTargetWdmGetTargetDeviceObject method returns is valid until the driver calls WdfIoTargetClose or WdfIoTargetCloseForQueryRemove, or until the remote I/O target object is deleted. If the driver provides an EvtCleanupCallback function for the remote I/O target object, and if the object is deleted before the remote I/O target is closed, the pointer is valid until the EvtCleanupCallback function returns.

For more information about WdfIoTargetWdmGetTargetDeviceObject, see Obtaining Information About a General I/O Target.

For more information about I/O targets, see Using I/O Targets.

The following code example checks an I/O target's WDM DEVICE_OBJECT structure to verify that the target supports direct I/O operations.

if (!((WdfIoTargetWdmGetTargetDeviceObject(Adapter->IoTarget))->Flags
 & DO_DIRECT_IO)) {
    ASSERTMSG("Target device doesn't support direct I/O\n", FALSE);
    return STATUS_INVALID_DEVICE_REQUEST;
}

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfiotarget.h (includeWdf.h)

ライブラリ

Wdf<MajorVersionNumber>000.sys (see Framework Library Versions.)

IRQL

<=DISPATCH_LEVEL

参照

DEVICE_OBJECT
WdfDeviceGetIoTarget
WdfIoTargetCreate
WdfIoTargetWdmGetTargetFileHandle
WdfIoTargetWdmGetTargetFileObject

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft