WdfDeviceSetDeviceInterfaceStateEx - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdfdevice.h

VOID WdfDeviceSetDeviceInterfaceStateEx(
  WDFDEVICE        Device,
  const GUID       *InterfaceClassGUID,
  PCUNICODE_STRING ReferenceString,
  BOOLEAN          IsInterfaceEnabled
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdfdevice-wdfdevicesetdeviceinterfacestateex)

Description

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

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.

Remarks

The driver can call this function either before or after the device has started.

When called before the device starts (for example from EvtDriverDeviceAdd, EvtChildListCreateDevice, or EvtDevicePrepareHardware), the driver should set IsInterfaceEnabled to FALSE to prevent the interface from being automatically enabled during PnP start. Setting the parameter to TRUE before the device starts is redundant and such a call should be removed.

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

See also

WdfDeviceSetDeviceInterfaceState

Enabling and Disabling a Device Interface