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

WdfDeviceInitSetExclusive 方法

The WdfDeviceInitSetExclusive method indicates whether a specified device is an exclusive device.

语法

VOID WdfDeviceInitSetExclusive(
  [in]  PWDFDEVICE_INIT DeviceInit,
  [in]  BOOLEAN IsExclusive
);

参数

DeviceInit [in]

A pointer to a WDFDEVICE_INIT structure.

IsExclusive [in]

A Boolean value which, if TRUE, indicates that the device is an exclusive device. If FALSE, the device is not an exclusive device.

返回值

None

评论

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.

示例

The following code example indicates that a device is an exclusive device.

WdfDeviceInitSetExclusive(
                          DeviceInit,
                          TRUE
                          );

要求

版本

Available in version 1.0 and later versions of KMDF.

标头

Wdfdevice.h (包括Wdf.h)

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

IRQL

<= DISPATCH_LEVEL

另请参见

EvtDriverDeviceAdd
WdfDeviceCreate

 

 

社区附加资源

显示:
© 2014 Microsoft