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

WdfDeviceSetDeviceInterfaceState 方法

The WdfDeviceSetDeviceInterfaceState method enables or disables a device interface for a specified device.

语法

VOID WdfDeviceSetDeviceInterfaceState(
  [in]            WDFDEVICE Device,
  [in]            const GUID *InterfaceClassGUID,
  [in, optional]  PCUNICODE_STRING ReferenceString,
  [in]            BOOLEAN IsInterfaceEnabled
);

参数

Device [in]

A handle to a framework device object.

InterfaceClassGUID [in]

A pointer to a GUID that identifies the device interface class.

ReferenceString [in, optional]

A pointer to a UNICODE_STRING structure that describes a reference string for the device interface. This parameter is optional and can be NULL.

IsInterfaceEnabled [in]

A Boolean value that, if TRUE, enables the specified device interface instance or, if FALSE, disables it.

返回值

None.

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

评论

For more information about device interfaces and the WdfDeviceSetDeviceInterfaceState method, see Using Device Interfaces.

示例

The following code example disables a driver's COM port interface.

WdfDeviceSetDeviceInterfaceState (
                                  Device,
                                  (LPGUID) &GUID_DEVINTERFACE_COMPORT,
                                  NULL,
                                  FALSE
                                  );

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfdevice.h (包括Wdf.h)

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

IRQL

PASSIVE_LEVEL

另请参见

UNICODE_STRING
WdfDeviceCreateDeviceInterface

 

 

社区附加资源

显示:
© 2014 Microsoft