EVT_ACX_FACTORY_CIRCUIT_PREPARE_HARDWARE - NtDoc

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

EVT_ACX_FACTORY_CIRCUIT_PREPARE_HARDWARE EvtAcxFactoryCircuitPrepareHardware;

NTSTATUS EvtAcxFactoryCircuitPrepareHardware(
  WDFDEVICE Device,
  ACXFACTORYCIRCUIT Factory,
  WDFCMRESLIST ResourcesRaw,
  WDFCMRESLIST ResourcesTranslated
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-acxcircuit-evt_acx_factory_circuit_prepare_hardware)

Description

The EVT_ACX_FACTORY_CIRCUIT_PREPARE_HARDWARE callback is used by the driver to add functionality when a circuit factory is in the prepare hardware phase.

Parameters

Device

A WDFDEVICE object (described in Summary of Framework Objects) that is associated with the ACX circuit.

Factory

The existing circuit factory ACXFACTORYCIRCUIT Object. For more information about ACX objects, see Summary of ACX Objects.

ResourcesRaw

A WDF resource list that describes the raw resources to be used for the prepare hardware phase. This is a WDF framework resource-list object that represents a list of hardware resources for a device. For more information about raw resources, see Hardware Resources for Framework-Based Drivers.

ResourcesTranslated

A WDF resource list that describes the translated resources to be used for the prepare hardware phase. This is a WDF framework resource-list object that represents a list of hardware resources for a device. For more information about translated resource lists, see Raw and Translated Resources.

Return value

Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.

Remarks

To register an EvtAcxFactoryCircuitPrepareHardware callback function, a driver must call the AcxFactoryCircuitInitSetAcxCircuitPnpPowerCallbacks method.

If the driver has registered an EvtAcxFactoryCircuitPrepareHardware callback function for an ACXFACTORYCIRCUIT, the ACX framework calls the function after WDF framework calls the driver's EvtDevicePrepareHardware callback function.

The EvtAcxFactoryCircuitPrepareHardware callback function accesses the device's raw and translated hardware resources by using the ResourcesRaw and ResourcesTranslated handles that it receives. The callback function can call WdfCmResourceListGetCount and WdfCmResourceListGetDescriptor to traverse the resource lists. This callback function cannot modify the resource lists.

For more information about resource lists and the order in which the resources appear, see Raw and Translated Resources.

Typically, your driver's EvtAcxFactoryCircuitPrepareHardware callback function does the following, if necessary:

The ResourcesRaw and ResourcesTranslated handles that the EvtAcxCircuitPrepareHardware/EvtDevicePrepareHardware callback function receives remain valid until the driver's EvtDeviceReleaseHardware callback function returns.

If the driver fails the EvtAcxFactoryCircuitPrepareHardware callback, the ACXFACTORYCIRCUIT object is placed in the delete-pending state.

For more information about hardware resources, see Introduction to Hardware Resources.

For more information about when the ACX and WDF framework call these callback functions, see PnP and Power Management Scenarios.

For more information about drivers that provide this callback function, see Supporting PnP and Power Management in Function Driver.

ACX requirements

Minimum ACX version: 1.0

For more information about ACX versions, see ACX version overview.

See also