HwNProcessAddDevicePreDeviceCreate function (hwnclx.h)
Supplies the device prepare/release and entry/exit callbacks to the Windows Driver Foundation (WDF) for transitioning the device into different states. This function should be called by the client driver when the WDF invokes the driver’s EVT_WDF_DRIVER_DEVICE_ADD routine, but before creating the device object.
Syntax
FORCEINLINE NTSTATUS HwNProcessAddDevicePreDeviceCreate(
_In_ WDFDRIVER Driver,
_In_ PWDFDEVICE_INIT DeviceInit,
_Out_ PWDF_OBJECT_ATTRIBUTES FdoAttributes
);
Parameters
[in] Driver
Handle to the client drivers framework driver object.
[in] DeviceInit
A pointer to a framework-allocated WDFDEVICE_INIT structure.
[out] FdoAttributes
Pointer to a WDF_OBJECT_ATTRIBUTES structure that describes the attributes of the client driver’s device object when it’s created.
Return value
Returns STATUS_SUCCESS if function succeeds. Returns STATUS_INVALID_PARAMETER if corresponding client driver can't be found. Otherwise, it returns one of the error status values defined in Ntstatus.h.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1709 |
Minimum supported server | Windows Server 2016 |
Target Platform | Windows |
Header | hwnclx.h |
Library | Mshwnclxstub.lib |
IRQL | PASSIVE_LEVEL |