信息
您所需的主题如下所示。但此主题未包含在此库中。

WdfFileObjectGetDevice 方法

The WdfFileObjectGetDevice method returns the framework device object that is associated with a specified framework file object.

语法

WDFDEVICE WdfFileObjectGetDevice(
  [in]  WDFFILEOBJECT FileObject
);

参数

FileObject [in]

A handle to a framework file object.

返回值

WdfFileObjectGetDevice returns a handle to the framework device object that is associated with the specified framework file object.

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

评论

For more information about framework file objects, see Framework File Objects.

示例

The following code example shows how an EvtFileClose callback function can obtain the framework device object that is associated with a specified framework file object.

VOID
MyEvtFileClose(
    IN WDFFILEOBJECT  FileObject
    )
{
    WDFDEVICE device;

    device = WdfFileObjectGetDevice(FileObject);
...
}

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdffileobject.h (包括Wdf.h)

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

IRQL

<=DISPATCH_LEVEL

 

 

社区附加资源

显示:
© 2014 Microsoft