WdfDeviceInitSetExclusive function (wdfdevice.h)
[Applies to KMDF only]
The WdfDeviceInitSetExclusive method indicates whether a specified device is an exclusive device.
Syntax
void WdfDeviceInitSetExclusive(
[in] PWDFDEVICE_INIT DeviceInit,
[in] BOOLEAN IsExclusive
);
Parameters
[in] DeviceInit
A pointer to a WDFDEVICE_INIT structure.
[in] IsExclusive
A Boolean value which, if TRUE, indicates that the device is an exclusive device. If FALSE, the device is not an exclusive device.
Return value
None
Remarks
If a driver calls WdfDeviceInitSetExclusive, it must do so before it calls WdfDeviceCreate.
If a driver calls WdfDeviceInitSetExclusive, only that driver's device object is exclusive. To make a device's entire device stack exclusive, the device's INF file should include an INF AddReg directive that sets an Exclusive entry to TRUE in the registry.
For more information about calling WdfDeviceCreate, see Creating a Framework Device Object.
If you are writing a UMDF driver, you must modify your driver's INF file or make registry changes to indicate whether the device is exclusive. For more information about using the registry, see Setting Device Object Registry Properties During Installation.
Examples
The following code example indicates that a device is an exclusive device.
WdfDeviceInitSetExclusive(
DeviceInit,
TRUE
);
Requirements
Requirement | Value |
---|---|
Target Platform | Universal |
Minimum KMDF version | 1.0 |
Header | wdfdevice.h (include Wdf.h) |
Library | Wdf01000.sys (see Framework Library Versioning.) |
IRQL | <= DISPATCH_LEVEL |
DDI compliance rules | ChildDeviceInitAPI(kmdf), ControlDeviceInitAPI(kmdf), DeviceInitAPI(kmdf), DriverCreate(kmdf), KmdfIrql(kmdf), KmdfIrql2(kmdf), KmdfIrqlExplicit(kmdf), PdoDeviceInitAPI(kmdf) |