EvtDeviceReportedMissing
EvtDeviceUsageNotificationEx
EvtDeviceWdmIrpDispatch
EvtDeviceWdmPostPoFxRegisterDevice
EvtDeviceWdmPrePoFxUnregisterDevice
WDF_DEVICE_INTERFACE_PROPERTY_DATA
WDF_DEVICE_INTERFACE_PROPERTY_DATA_INIT
WDF_DEVICE_PROPERTY_DATA
WDF_DEVICE_PROPERTY_DATA_INIT
WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS
WDF_EVENT_TYPE
WDF_IO_TYPE_CONFIG
WDF_IO_TYPE_CONFIG_INIT
WDF_POWER_FRAMEWORK_SETTINGS
WDF_POWER_FRAMEWORK_SETTINGS_INIT
WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE
WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE
WDF_REMOVE_LOCK_OPTIONS
WDF_REMOVE_LOCK_OPTIONS_FLAGS
WDF_REMOVE_LOCK_OPTIONS_INIT
WdfDeviceAllocAndQueryInterfaceProperty method
WdfDeviceAllocAndQueryPropertyEx method
WdfDeviceAssignInterfaceProperty method
WdfDeviceAssignProperty method
WdfDeviceConfigureWdmIrpDispatchCallback method
WdfDeviceGetDeviceStackIoType method
WdfDeviceGetHardwareRegisterMappedAddress
WdfDeviceInitSetIoTypeEx method
WdfDeviceInitSetReleaseHardwareOrderOnFailure method
WdfDeviceInitSetRemoveLockOptions method
WdfDeviceMapIoSpace
WdfDeviceOpenDevicemapKey method
WdfDevicePostEvent
WdfDeviceQueryInterfaceProperty method
WdfDeviceQueryPropertyEx method
WdfDeviceReadFromHardware
WdfDeviceResumeIdleWithTag method
WdfDeviceStopIdleWithTag method
WdfDeviceUnmapIoSpace
WdfDeviceWdmAssignPowerFrameworkSettings method
WdfDeviceWdmDispatchIrp method
WdfDeviceWdmDispatchIrpToIoQueue method
WdfDeviceWriteToHardware
WdfFdoInitAllocAndQueryPropertyEx method
WdfFdoInitQueryPropertyEx method
展开 最小化

WdfDeviceInitSetCharacteristics 方法

The WdfDeviceInitSetCharacteristics method sets device characteristics for a specified device.

语法

VOID WdfDeviceInitSetCharacteristics(
  [in]  PWDFDEVICE_INIT DeviceInit,
  [in]  ULONG DeviceCharacteristics,
  [in]  BOOLEAN OrInValues
);

参数

DeviceInit [in]

A pointer to a WDFDEVICE_INIT structure.

DeviceCharacteristics [in]

A value that consists of ORed system-defined constants that represent device characteristics. For more information, see the Characteristics member of the DEVICE_OBJECT structure.

OrInValues [in]

A Boolean value. If this value is TRUE, the DeviceCharacteristics value is ORed with existing device characteristics. If the value is FALSE, the DeviceCharacteristics value replaces existing device characteristics.

返回值

None

评论

To set device characteristics, call the WdfDeviceInitSetCharacteristics method in your EvtDriverDeviceAdd callback function before calling WdfDeviceCreate. If your driver cannot determine a device's characteristics until after the EvtDriverDeviceAdd callback function returns, call WdfDeviceSetCharacteristics.

For more information about calling WdfDeviceCreate, see Creating a Framework Device Object.

The framework always sets the FILE_DEVICE_SECURE_OPEN characteristic, so your driver does not have to set this characteristic.

Each call to WdfDeviceInitSetCharacteristics overwrites the settings of any previous call.

示例

The following code example indicates that a device is a floppy disk.

WdfDeviceInitSetCharacteristics(
                                DeviceInit,
                                FILE_FLOPPY_DISKETTE,
                                FALSE
                                );

要求

版本

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

另请参见

WdfDeviceSetCharacteristics

 

 

社区附加资源

添加
显示:
© 2015 Microsoft