HwNProcessAddDevicePreDeviceCreate - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// hwnclx.h

FORCEINLINE NTSTATUS  HwNProcessAddDevicePreDeviceCreate(
  _In_  WDFDRIVER               Driver,
  _In_  PWDFDEVICE_INIT         DeviceInit,
  _Out_ PWDF_OBJECT_ATTRIBUTES  FdoAttributes
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-hwnclx-hwnprocessadddevicepredevicecreate)

HwNProcessAddDevicePreDeviceCreate function

Description

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.

Parameters

Driver [in]

Handle to the client drivers framework driver object.

DeviceInit [in]

A pointer to a framework-allocated WDFDEVICE_INIT structure.

FdoAttributes [out]

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.

Syntax

FORCEINLINE NTSTATUS  HwNProcessAddDevicePreDeviceCreate(
  _In_  WDFDRIVER               Driver,
  _In_  PWDFDEVICE_INIT         DeviceInit,
  _Out_ PWDF_OBJECT_ATTRIBUTES  FdoAttributes
);

See also

Hardware notifications support

Hardware notifications reference