DriverEntry function (mcd.h)
The DriverEntry miniport driver routine is called when the miniport driver is loaded.
Syntax
NTSTATUS DriverEntry(
[in] PDRIVER_OBJECT DriverObject,
[in] PUNICODE_STRING RegistryPath
);
Parameters
[in] DriverObject
A pointer to an opaque structure to be used as the first parameter when this routine calls the AtaPortInitializeEx routine.
[in] RegistryPath
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.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | mcd.h (include Ntddk.h, Mcd.h) |
Library | NtosKrnl.lib |
DLL | NtosKrnl.exe |