WdfDeviceSetDeviceInterfaceStateEx function (wdfdevice.h)

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

Syntax

void WdfDeviceSetDeviceInterfaceStateEx(
  WDFDEVICE        Device,
  const GUID       *InterfaceClassGUID,
  PCUNICODE_STRING ReferenceString,
  BOOLEAN          IsInterfaceEnabled
);

Parameters

Device

A handle to a framework device object.

InterfaceClassGUID

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

ReferenceString

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

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

Return value

None

Remarks

The driver can call this function from EVT_WDF_DRIVER_DEVICE_ADD, or after the device has started.

When calling from EVT_WDF_DRIVER_DEVICE_ADD, the driver should set IsInterfaceEnabled to FALSE.

When calling after the device has started, the behavior is the same as WdfDeviceSetDeviceInterfaceState.

Requirements

   
Minimum supported client Windows 10, version 2004
Minimum KMDF version 1.31
Minimum UMDF version 1.31
Header wdfdevice.h (include Wdf.h)
Library Wdf01000.sys (KMDF); WUDFx02000.dll (UMDF)
IRQL PASSIVE_LEVEL

See also

WdfDeviceSetDeviceInterfaceState

Enabling and Disabling a Device Interface