DriverEntry - NtDoc

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

NTSTATUS DriverEntry(
  [in] PDRIVER_OBJECT  DriverObject,
  [in] PUNICODE_STRING RegistryPath
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-mcd-driverentry)

DriverEntry function

Description

The DriverEntry miniport driver routine is called when the miniport driver is loaded.

Note The ATA port driver and ATA miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.

Parameters

DriverObject [in]

A pointer to an opaque structure to be used as the first parameter when this routine calls the AtaPortInitializeEx routine.

RegistryPath [in]

A pointer to an opaque structure to be used as the second parameter when this routine calls the AtaPortInitializeEx routine.

Return value

The return values for this routine are recommended to mirror the return values of AtaPortInitializeEx.

Remarks

DriverEntry is the first function that is called in an ATA miniport driver. The ATA miniport driver must allocate an IDE_CONTROLLER_INTERFACE structure, initialize it, and send it to AtaPortInitializeEx. The ATA miniport driver indicates its support for the channel interface by setting the ChannelExtensionSize and the AtaChannelInitRoutine entry point in the IDE_CONTROLLER_INTERFACE structure. This causes the ATA port driver to call the function that is specified in the AtaChannelInitRoutine field that has a ChannelExtension of size ChannelExtensionSize. The function is called one time for every NumberOfChannels specified in the ControllerConfiguration structure that are returned by AtaAdapterControl when AtaAdapterControl handles an IdeStart action.

See also

AtaAdapterControl

AtaPortInitializeEx