Declaring Functions by Using Function Role Types for Storport Drivers

To enable SDV to analyze a Storport driver, you must declare your functions by using the function role type declarations that are defined for Storport. The function role types are defined in Storport.h.

You must declare each callback function in a Storport driver by specifying the corresponding role type.

The following code example shows the function role type declaration for DriverIntialize callback function. The function role type is sp_DRIVER_INITIALIZE.

sp_DRIVER_INITIALIZE DriverEntry;

If a callback function has a function prototype declaration, you must replace the function prototype with the function role type declaration.

Function role type Storport routine
sp_DRIVER_INITIALIZE DriverEntry
HW_INITIALIZE HwStorInitialize
HW_BUILDIO HwStorBuildIo
HW_STARTIO HwStorStartIo
HW_INTERRUPT HwStorInterrupt
HW_TIMER HwStorTimer
HW_FIND_ADAPTER HwStorFindAdapter
HW_RESET_BUS HwStorResetBus
HW_ADAPTER_CONTROL HwStorAdapterControl
HW_PASSIVE_INITIALIZE_ROUTINE HwStorPassiveInitializeRoutine
HW_DPC_ROUTINE HwStorDpcRoutine
HW_FREE_ADAPTER_RESOURCES HwFreeAdapterResources part of the VIRTUAL_HW_INITIALIZATION_DATA structure.
HW_PROCESS_SERVICE_REQUEST HwProcessServiceRequest part of the VIRTUAL_HW_INITIALIZATION_DATA structure.
HW_COMPLETE_SERVICE_IRP HwCompleteServiceIrp part of the VIRTUAL_HW_INITIALIZATION_DATA structure.
HW_INITIALIZE_TRACING HwInitializeTracing part of the VIRTUAL_HW_INITIALIZATION_DATA structure.
HW_CLEANUP_TRACING HwCleanupTracing part of the VIRTUAL_HW_INITIALIZATION_DATA structure.
VIRTUAL_HW_FIND_ADAPTER HwFindAdapter part of the VIRTUAL_HW_INITIALIZATION_DATA structure.
HW_MESSAGE_SIGNALED_INTERRUPT_ROUTINE HwMSInterruptRoutine