This header is used by wdf. For more information, see:
This topic orders the Windows Driver Frameworks (WDF) device object reference by category.
The categories on this page are:
- General Framework Device Object Event Callback Functions
- General Framework Device Object Initialization Methods
- General Framework Device Object Methods
- General Framework Device Object Structures and Enumerations
- Initialization Functions for Device Object Structures
General Framework Device Object Event Callback Functions
General Framework Device Object Initialization Methods
General Framework Device Object Methods
General Framework Device Object Structures and Enumerations
Initialization Functions for Device Object Structures
wdfdevice.h contains the following programming interfaces:
The WDF_DEVICE_INTERFACE_PROPERTY_DATA_INIT function initializes a driver's WDF_DEVICE_INTERFACE_PROPERTY_DATA structure.
The WDF_DEVICE_PNP_CAPABILITIES_INIT function initializes a WDF_DEVICE_PNP_CAPABILITIES structure.
The WDF_DEVICE_POWER_CAPABILITIES_INIT function initializes a WDF_DEVICE_POWER_CAPABILITIES structure.
The WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS_INIT function initializes a driver's WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure.
The WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS_INIT function initializes a driver's WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS structure.
The WDF_DEVICE_PROPERTY_DATA_INIT function initializes a driver's WDF_DEVICE_PROPERTY_DATA structure.
The WDF_DEVICE_STATE_INIT function initializes a driver's WDF_DEVICE_STATE structure.
The WDF_FILEOBJECT_CONFIG_INIT function initializes a driver's WDF_FILEOBJECT_CONFIG structure.
The WDF_IO_TYPE_CONFIG_INIT function initializes a driver's WDF_IO_TYPE_CONFIG structure.
The WDF_PNPPOWER_EVENT_CALLBACKS_INIT function initializes a driver's WDF_PNPPOWER_EVENT_CALLBACKS structure.
The WDF_POWER_FRAMEWORK_SETTINGS_INIT function initializes a WDF_POWER_FRAMEWORK_SETTINGS structure.
The WDF_POWER_POLICY_EVENT_CALLBACKS_INIT function initializes a driver's WDF_POWER_POLICY_EVENT_CALLBACKS structure.
The WDF_REMOVE_LOCK_OPTIONS_INIT function initializes a WDF_REMOVE_LOCK_OPTIONS structure.
The WdfDeviceAddDependentUsageDeviceObject method indicates that a specified device depends on another device when the specified device is used to store special files.
The WdfDeviceAddRemovalRelationsPhysicalDevice method indicates that a specified device must be removed when another specified device is removed.
The WdfDeviceAllocAndQueryInterfaceProperty method allocates a buffer and retrieves a specified device interface property.
The WdfDeviceAllocAndQueryProperty method allocates a buffer and retrieves a specified device property.
The WdfDeviceAllocAndQueryPropertyEx method allocates a buffer and retrieves a specified device property.
The WdfDeviceAssignInterfaceProperty method modifies the current value of a device interface property.
The WdfDeviceAssignMofResourceName method registers a MOF resource name for a specified device.
The WdfDeviceAssignProperty method modifies the current setting of a device property.
The WdfDeviceAssignS0IdleSettings method provides driver-supplied information that the framework uses when a device is idle and the system is in its working (S0) state.
The WdfDeviceAssignSxWakeSettings method provides driver-supplied information about a device's ability to trigger a wake signal while both the device and the system are in a low-power state.
The WdfDeviceClearRemovalRelationsDevices method removes all devices from the list of devices that must be removed when a specified device is removed.
The WdfDeviceConfigureRequestDispatching method causes the framework to queue a specified type of I/O requests to a specified I/O queue.
The WdfDeviceConfigureWdmIrpDispatchCallback method registers a driver's EvtDeviceWdmIrpDispatch callback function.
The WdfDeviceCreate method creates a framework device object.
The WdfDeviceCreateDeviceInterface method creates a device interface for a specified device.
The WdfDeviceCreateSymbolicLink method creates a symbolic link to a specified device.
The WdfDeviceEnqueueRequest method delivers a specified I/O request to the framework, so that the framework can subsequently add the request to one of the I/O queues that the driver has created for the specified device.
The WdfDeviceGetAlignmentRequirement method retrieves a device's address alignment requirement for memory transfer operations.
The WdfDeviceGetCharacteristics method returns device characteristics for a specified device.
The WdfDeviceGetDefaultQueue method returns a handle to a device's default I/O queue.
The WdfDeviceGetDevicePnpState method returns the current state of the framework's Plug and Play state machine for a specified device.
The WdfDeviceGetDevicePowerPolicyState method returns the current state of the framework's power policy state machine, for a specified device.
The WdfDeviceGetDevicePowerState method returns the current state of the framework's power state machine, for a specified device.
The WdfDeviceGetDeviceStackIoType method retrieves the buffer access methods that the framework is using for a device.
The WdfDeviceGetDeviceState method retrieves the device state for a specified device.
The WdfDeviceGetDriver method returns a handle to the framework driver object that is associated with a specified framework device object.
The WdfDeviceGetFileObject method returns a handle to the framework file object that is associated with a specified WDM file object.
A driver calls WdfDeviceGetHardwareRegisterMappedAddress to get the user-mode mapped address of the memory resource it mapped previously using WdfDeviceMapIoSpace.
The WdfDeviceGetIoTarget method returns a handle to a function or filter driver's local I/O target, for a specified device.
The WdfDeviceGetSystemPowerAction method returns the system power action, if any, that is currently occurring for the computer.
The WdfDeviceIndicateWakeStatus method informs the framework that the calling bus driver has stopped waiting for a specified device to trigger a wake signal on the bus.
The WdfDeviceInitAssignName method assigns a device name to a device's device object.
The WdfDeviceInitAssignSDDLString method assigns a security setting for a device.
The WdfDeviceInitAssignWdmIrpPreprocessCallback method registers a callback function to handle an IRP major function code and, optionally, one or more minor function codes that are associated with the major function code.
The WdfDeviceInitFree method deallocates a WDFDEVICE_INIT structure.
The WdfDeviceInitRegisterPnpStateChangeCallback method registers a driver-supplied event callback function that the framework calls when a device's Plug and Play state machine changes state.
The WdfDeviceInitRegisterPowerPolicyStateChangeCallback method registers a driver-supplied event callback function that the framework calls when a device's power policy state machine changes state.
The WdfDeviceInitRegisterPowerStateChangeCallback method registers a driver-supplied event callback function that the framework calls when a device's power state machine changes state.
The WdfDeviceInitSetCharacteristics method sets device characteristics for a specified device.
The WdfDeviceInitSetDeviceClass method specifies a GUID that identifies the device's device setup class.
The WdfDeviceInitSetDeviceType method sets the device type for a specified device.
The WdfDeviceInitSetExclusive method indicates whether a specified device is an exclusive device.
The WdfDeviceInitSetFileObjectConfig method registers event callback functions and sets configuration information for the driver's framework file objects.
The WdfDeviceInitSetIoInCallerContextCallback method registers a driver's EvtIoInCallerContext event callback function.
The WdfDeviceInitSetIoType method sets the method or preference for how a driver will access the data buffers that are included in read and write requests for a specified device.
The WdfDeviceInitSetIoTypeEx method sets the method or preference for how a driver will access the data buffers that are included in read and write requests, as well as device I/O control requests, for a specified device.
The WdfDeviceInitSetPnpPowerEventCallbacks method registers a driver's Plug and Play and power management event callback functions.
The WdfDeviceInitSetPowerInrush method informs the power manager that the specified device requires an inrush of current when it starts.
The WdfDeviceInitSetPowerNotPageable method informs the power manager that the driver will not access pageable data while the system is transitioning between a sleeping state and the working (S0) state.
The WdfDeviceInitSetPowerPageable method informs the power manager that the driver must be able to access pageable data while the system is transitioning between a sleeping state and the working (S0) state.
The WdfDeviceInitSetPowerPolicyEventCallbacks method registers a driver's power policy event callback functions.
The WdfDeviceInitSetPowerPolicyOwnership method establishes whether the calling driver is, or is not, the power policy owner for a specified device.
The WdfDeviceInitSetReleaseHardwareOrderOnFailure method specifies whether the framework calls the driver's EvtDeviceReleaseHardware callback function immediately after device failure, or waits until all child devices have been removed.
The WdfDeviceInitSetRemoveLockOptions method causes the framework to acquire a remove lock before delivering an IRP of any type to the driver.
The WdfDeviceInitSetRequestAttributes method sets object attributes that will be used for all of the framework request objects that the framework delivers to the driver from the device's I/O queues.
The WdfDeviceMapIoSpace function maps the given physical address range to system address space and returns a pseudo base address.
The WdfDeviceOpenDevicemapKey method opens the DEVICEMAP key and creates a framework registry-key object that represents the registry key.
The WdfDeviceOpenRegistryKey method opens a device's hardware key or a driver's software key in the registry and creates a framework registry-key object that represents the registry key.
The WdfDevicePostEvent method asynchronously notifies applications that are waiting for the specified event from a driver.
The WdfDeviceQueryInterfaceProperty method retrieves a specified device interface property.
The WdfDeviceQueryProperty method retrieves a specified device property.
The WdfDeviceQueryPropertyEx method retrieves a specified device property.
The WdfDeviceReadFromHardware method is used internally by the framework. Do not use.
The WdfDeviceRemoveDependentUsageDeviceObject method indicates that a specified device no longer depends on another device when the specified device is used to store special files.
The WdfDeviceRemoveRemovalRelationsPhysicalDevice method removes a specified device from the list of devices that must be removed when another specified device is removed.
The WdfDeviceResumeIdle method informs the framework that the specified device is not in use and can be placed in a device low-power state if it remains idle.
The WdfDeviceResumeIdleWithTag macro decrements the power reference count for a specified framework device object and assigns the driver's current file name and line number to the reference. The macro also assigns a tag value to the reference.
This WdfDeviceRetrieveCompanionTarget function article is for internal use only.
Learn more about: WdfDeviceRetrieveDeviceDirectoryString function
The WdfDeviceRetrieveDeviceInterfaceString method retrieves the symbolic link name that the operating system assigned to a device interface that the driver registered for a specified device.
The WdfDeviceRetrieveDeviceName method returns the device name for a specified device.
The WdfDeviceSetAlignmentRequirement method registers the driver's preferred address alignment for the data buffers that the device uses during memory transfer operations.
The WdfDeviceSetBusInformationForChildren method sets information about a bus that a bus driver supports. This information is available to the bus's child devices.
The WdfDeviceSetCharacteristics method sets device characteristics for a specified device.
The WdfDeviceSetDeviceInterfaceState method enables or disables a device interface for a specified device.
Learn more about: WdfDeviceSetDeviceInterfaceStateEx
The WdfDeviceSetDeviceState method sets the device state for a specified device.
The WdfDeviceSetFailed method informs the framework that the driver encountered a hardware or software error that is associated with a specified device.
The WdfDeviceSetPnpCapabilities method reports a device's Plug and Play capabilities.
The WdfDeviceSetPowerCapabilities method reports a device's power capabilities.
The WdfDeviceSetSpecialFileSupport method enables or disables a function driver's support for special files, for the specified device.
The WdfDeviceSetStaticStopRemove method informs the framework whether a device can be stopped and removed.
The WdfDeviceStopIdle method informs the framework that the specified device must be placed in its working (D0) power state.
The WdfDeviceStopIdleWithTag macro increments the power reference count for a specified framework device object and assigns the driver's current file name and line number to the reference. The macro also assigns a tag value to the reference.
The WdfDeviceUnmapIoSpace function unmaps a specified range of physical addresses previously mapped by the WdfDeviceMapIoSpace function.
The WdfDeviceWdmAssignPowerFrameworkSettings method registers power management framework (PoFx) settings for single-component devices.
The WdfDeviceWdmDispatchIrp method returns a dispatched IRP to the framework from EvtDeviceWdmIrpDispatch.
The WdfDeviceWdmDispatchIrpToIoQueue method forwards the IRP to a specified I/O queue.
The WdfDeviceWdmDispatchPreprocessedIrp method returns a preprocessed IRP to the framework.
The WdfDeviceWdmGetAttachedDevice method returns the next-lower WDM device object in the device stack.
The WdfDeviceWdmGetDeviceObject method returns the Windows Driver Model (WDM) device object that is associated with a specified framework device object.
The WdfDeviceWdmGetPhysicalDevice method retrieves the physical device's WDM PDO from the device stack.
The WdfDeviceWriteToHardware method is used internally by the framework. Do not use.
The WdfDevStateIsNP method returns a Boolean value that indicates whether a specified power state or power policy state is a nonpageable state.
The WdfDevStateNormalize method removes extra bits from a specified framework state machine value so that the driver can use the value as an index into an array of machine states.
The WdfWdmDeviceGetWdfDeviceHandle method returns a handle to the framework device object that is associated with a specified WDM device object.
A driver's EvtDeviceArmWakeFromS0 event callback function arms (that is, enables) a device so that it can trigger a wake signal while in a low-power device state, if the system remains in the system working state (S0).
A driver's EvtDeviceArmWakeFromSx event callback function arms (that is, enables) a device so that it can trigger a wake signal while in a low-power device state.
A driver's EvtDeviceArmWakeFromSxWithReason event callback function arms (that is, enables) a device so that it can trigger a wake signal while in a low-power device state.
A driver's EvtDeviceD0Entry event callback function performs operations that are needed when the driver's device enters the D0 power state.
Learn more about: EVT_WDF_DEVICE_D0_ENTRY_POST_HARDWARE_ENABLED
A driver's EvtDeviceD0EntryPostInterruptsEnabled event callback function performs device-specific operations that are required after the driver has enabled the device's hardware interrupts.
A driver's EvtDeviceD0Exit event callback function performs operations that are needed when the driver's device leaves the D0 power state.
Learn more about: EVT_WDF_DEVICE_D0_EXIT_PRE_HARDWARE_DISABLED
A driver's EvtDeviceD0ExitPreInterruptsDisabled event callback function performs device-specific operations that are required before the driver disables the device's hardware interrupts.
A driver's EvtDeviceDisarmWakeFromS0 event callback function disarms (that is, disables) a device's ability to trigger a wake signal while in a low-power device state, if the system remains in the system working state (S0).
A driver's EvtDeviceDisarmWakeFromSx event callback function disarms (that is, disables) a device's ability to trigger a wake signal while the device and system are in low-power states.
A driver's EvtDeviceFileCreate callback function handles operations that must be performed when an application requests access to a device.
A driver's EvtDevicePnpStateChange event callback function informs the driver that a device's Plug and Play (PnP) state machine is moving from one state to another.
A driver's EvtDevicePowerPolicyStateChange event callback function informs the driver that a device's power policy state machine is moving from one state to another.
A driver's EvtDevicePowerStateChange event callback function informs the driver that a device's power state machine is moving from one state to another.
A driver's EvtDevicePrepareHardware event callback function performs any operations that are needed to make a device accessible to the driver.
A driver's EvtDeviceQueryRemove event callback function determines whether a specified device can be stopped and removed.
A driver's EvtDeviceQueryStop event callback function determines whether a specified device can be stopped so that the PnP manager can redistribute system hardware resources.
A driver's EvtDeviceRelationsQuery event callback reports changes in the relationships among devices that are supported by the driver.
A driver's EvtDeviceReleaseHardware event callback function performs operations that are needed when a device is no longer accessible.
A driver's EvtDeviceSelfManagedIoCleanup event callback function handles deallocation activity for the device's self-managed I/O operations, after a device has been removed.
A driver's EvtDeviceSelfManagedIoFlush event callback function handles flush activity for the device's self-managed I/O operations.
A driver's EvtDeviceSelfManagedIoInit event callback function initializes and starts the device's self-managed I/O operations.
A driver's EvtDeviceSelfManagedIoRestart event callback function restarts a device's self-managed I/O operations.
A driver's EvtDeviceSelfManagedIoSuspend event callback function suspends a device's self-managed I/O operations.
A driver's EvtDeviceSurpriseRemoval event callback function performs any operations that are needed after a device has been unexpectedly removed from the system or after a driver reports that the device has failed.
A driver's EvtDeviceUsageNotification event callback function informs the driver when a device is being used for special files.
A driver's EvtDeviceUsageNotificationEx event callback function determines whether a device can support a special file type.
A driver's EvtDeviceWakeFromS0Triggered event callback function informs the driver that its device, which had previously entered a low-power device state while the system power state remained at S0, might have triggered a wake signal.
A driver's EvtDeviceWakeFromSxTriggered event callback function informs the driver that its device, which had previously entered a low-power device state because system power was reduced, might have triggered a wake signal.
A driver's EvtFileCleanup callback function handles operations that must be performed when an application is closing all accesses to a device.
A driver's EvtFileClose callback function handles operations that must be performed when all of an application's accesses to a device have been closed.
A driver's EvtIoInCallerContext event callback function preprocesses an I/O request before the framework places it into an I/O queue.
A driver's EvtDeviceWdmIrpDispatch event callback function receives an IRP before the framework processes the IRP.
A driver's EvtDeviceWdmIrpPreprocess event callback function receives an IRP before the framework processes the IRP.
The EvtDeviceWdmPostPoFxRegisterDevice callback function performs device-specific operations after the framework has registered with the power framework.
The EvtDeviceWdmPrePoFxUnregisterDevice callback function performs device-specific operations before the framework deletes a specified registration with the power framework.
The WDF_DEVICE_INTERFACE_PROPERTY_DATA structure describes a device interface property.
The WDF_DEVICE_PNP_CAPABILITIES structure describes a device's Plug and Play capabilities.
The WDF_DEVICE_PNP_NOTIFICATION_DATA structure describes a state change within a device's Plug and Play state machine.
The WDF_DEVICE_POWER_CAPABILITIES structure describes a device's power capabilities.
The WDF_DEVICE_POWER_NOTIFICATION_DATA structure describes a state change within a device's power state machine.
The WDF_DEVICE_POWER_POLICY_IDLE_SETTINGS structure contains driver-supplied information that the framework uses when a device is idle and the system is in the system working state (S0).
The WDF_DEVICE_POWER_POLICY_NOTIFICATION_DATA structure describes a state change within a device's power policy state machine.
The WDF_DEVICE_POWER_POLICY_WAKE_SETTINGS structure contains driver-supplied information about a device's ability to wake itself and the system, when both are in a low-power state.
The WDF_DEVICE_PROPERTY_DATA structure describes a device property.
The WDF_DEVICE_STATE structure specifies a device's Plug and Play state.
The WDF_FILEOBJECT_CONFIG structure contains configuration information of a driver's framework file objects.
The WDF_IO_TYPE_CONFIG structure specifies the driver's preferred buffer access method for read and write requests, and for device I/O control requests.
The WDF_PNPPOWER_EVENT_CALLBACKS structure contains pointers to a driver's Plug and Play and power event callback functions.
The WDF_POWER_FRAMEWORK_SETTINGS structure describes power management framework (PoFx) settings for single-component devices.
The WDF_POWER_POLICY_EVENT_CALLBACKS structure contains pointers to a driver's power policy event callback functions.
The WDF_REMOVE_LOCK_OPTIONS structure specifies options for acquiring a remove lock before delivering an IRP to the driver.
The WDF_DEVICE_FAILED_ACTION enumeration identifies the action that the framework will take when a driver reports an unrecoverable software or hardware failure.
This enumeration is used internally by the framework. Do not use. This enumeration is defined in wdfdevice.h.
Learn how the WDF_DEVICE_HWACCESS_TARGET_SIZE enumeration is used internally by the framework. Do not use. This enumeration is defined in wdfdevice.h.
The WDF_DEVICE_IO_TYPE enumeration is used to specify a method for accessing data buffers.
The WDF_DEVICE_PNP_STATE enumeration identifies all of the states that the framework's Plug and Play state machine can enter.
The WDF_DEVICE_POWER_POLICY_STATE enumeration identifies all of the states that the framework's power policy state machine can enter.
The WDF_DEVICE_POWER_STATE enumeration identifies all of the states that the framework's power state machine can enter.
The WDF_DISPATCH_IRP_TO_IO_QUEUE_FLAGS enumeration type defines flags that the driver can specify when it calls WdfDeviceWdmDispatchIrpToIoQueue.
The WDF_EVENT_TYPE enumeration specifies.
The WDF_FILEOBJECT_CLASS enumeration defines values that identify whether a driver requires a framework file object to represent a file that an application or another driver is attempting to create or open.
The WDF_POWER_DEVICE_STATE enumeration identifies the device power states that a device might support.
The WDF_POWER_POLICY_IDLE_TIMEOUT_CONSTANTS enumeration is reserved for internal use.
The WDF_POWER_POLICY_IDLE_TIMEOUT_TYPE enumeration identifies how the idle timeout for a device is determined.
The WDF_POWER_POLICY_S0_IDLE_CAPABILITIES enumeration identifies the capabilities that a device can support when it enters a low-power state while it is idling.
The WDF_POWER_POLICY_S0_IDLE_USER_CONTROL enumeration identifies whether a user can control a device's behavior when the device is idle and the system is in its working (S0) state.
The WDF_POWER_POLICY_SX_WAKE_USER_CONTROL enumeration identifies whether a user can control a device's ability to wake the system from a low system power state.
The WDF_RELEASE_HARDWARE_ORDER_ON_FAILURE enumeration specifies when the framework calls a driver's EvtDeviceReleaseHardware callback function.
The WDF_REMOVE_LOCK_OPTIONS_FLAGS enumeration type defines flags that are used in a driver's WDF_REMOVE_LOCK_OPTIONS structure.
The WDF_SPECIAL_FILE_TYPE enumeration identifies special file types that a device can support.
The WDF_STATE_NOTIFICATION_TYPE enumeration identifies the type of Plug and Play, power, or power policy notification that a framework-based driver will receive.