StorPortInitializeDpc function (storport.h)

The StorPortInitializeDpc routine initializes a StorPort DPC.

Syntax

void StorPortInitializeDpc(
  [in]  PVOID           DeviceExtension,
  [out] PSTOR_DPC       Dpc,
  [in]  PHW_DPC_ROUTINE HwDpcRoutine
);

Parameters

[in] DeviceExtension

Pointer to the per-adapter device extension.

[out] Dpc

Pointer to a buffer where a DPC object of type STOR_DPC will be created. The caller must ensure that the size in bytes of this buffer is greater than or equal to sizeof(STOR_DPC).

[in] HwDpcRoutine

Pointer to the DPC routine that corresponds to the DPC object pointed to by Dpc. The prototype for this deferred routine is defined in Storport.h as follows:

typedef
VOID
(*PHW_DPC_ROUTINE) 
  IN PSTOR_DPC  Dpc,
  IN PVOID  HwDeviceExtension,
  IN PVOID  SystemArgument1,
  IN PVOID  SystemArgument2
  );

Return value

None

Remarks

The StorPortInitializeDpc routine must be called during HBA initialization from within the miniport driver's HwStorPassiveInitializeRoutine routine.

This routine is implemented using inline function definitions, so that miniport drivers that use this routine will not have to link to libraries that are dependent on the version of the operating system. Miniport drivers can use this routine without sacrificing backward compatibility with versions of the operating system that do not support DPCs in storage miniport drivers.

Requirements

Requirement Value
Target Platform Universal
Header storport.h (include Storport.h)

See also

HwStorPassiveInitializeRoutine

STOR_DPC