WdfIoTargetWdmGetTargetFileObject 方法

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

语法

PFILE_OBJECT WdfIoTargetWdmGetTargetFileObject(
  [in]  WDFIOTARGET IoTarget
);

参数

IoTarget [in]

A handle to a remote I/O target object. This handle was obtained from a previous call to WdfIoTargetCreate.

返回值

WdfIoTargetWdmGetTargetFileObject returns a pointer to a WDM FILE_OBJECT structure.

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

评论

The pointer that the WdfIoTargetWdmGetTargetFileObject 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 WdfIoTargetWdmGetTargetFileObject, 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 obtains a pointer to the WDM file object that is associated with a remote I/O target.

PFILE_OBJECT pfileObject;

pfileObject = WdfIoTargetWdmGetTargetFileObject(IoTarget);

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfiotarget.h (包括Wdf.h)

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

IRQL

<=DISPATCH_LEVEL

另请参见

FILE_OBJECT
WdfIoTargetCreate
WdfIoTargetWdmGetTargetDeviceObject
WdfIoTargetWdmGetTargetFileHandle

 

 

社区附加资源

添加
显示:
© 2015 Microsoft