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
展開 最小化

WdfDeviceAddDependentUsageDeviceObject メソッド

The WdfDeviceAddDependentUsageDeviceObject method indicates that a specified device depends on another device when the specified device is used to store special files.

構文

NTSTATUS WdfDeviceAddDependentUsageDeviceObject(
  [in]  WDFDEVICE Device,
  [in]  PDEVICE_OBJECT DependentDevice
);

パラメーター

Device [in]

A handle to a framework device object.

DependentDevice [in]

A pointer to a caller-supplied DEVICE_OBJECT structure that identifies a device that Device depends on.

戻り値

If the operation succeeds, WdfDeviceAddDependentUsageDeviceObject method returns STATUS_SUCCESS. Additional return values include:

リターン コード説明
STATUS_INVALID_PARAMETER

DependentDevice is NULL.

STATUS_INSUFFICIENT_RESOURCES

A memory allocation failed.

 

The method might return other NTSTATUS values.

A bug check occurs if the driver supplies an invalid object handle.

解説

Your driver can call WdfDeviceAddDependentUsageDeviceObject to indicate that the device identified by Device depends on the device identified by DependentDevice, when Device supports special files. If your driver calls WdfDeviceAddDependentUsageDeviceObject, the framework calls the EvtDeviceUsageNotification callback functions in DependentDevice's drivers before it calls the EvtDeviceUsageNotification callback functions in Device's drivers.

Your driver can call WdfDeviceAddDependentUsageDeviceObject multiple times to identify multiple devices that Device depends on to support special files.

After a driver has called WdfDeviceAddDependentUsageDeviceObject, it can call WdfDeviceRemoveDependentUsageDeviceObject to remove the device identified by DependentDevice from the list of devices that Device depends on.

For more information about special files, see Supporting Special Files.

The following code example adds a device (pDeviceObject) to the list of devices that another device (Device) depends on.

status = WdfDeviceAddDependentUsageDeviceObject(
                                                device,
                                                pDeviceObject
                                                );

要件

バージョン

Available in version 1.0 and later versions of KMDF.

ヘッダー

Wdfdevice.h (includeWdf.h)

ライブラリ

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

IRQL

<= DISPATCH_LEVEL

参照

EvtDeviceUsageNotification
WdfDeviceRemoveDependentUsageDeviceObject

 

 

コミュニティの追加

追加
表示:
© 2015 Microsoft