EN
Dieser Inhalt ist in Ihrer Sprache leider nicht verfügbar. Im Folgenden finden Sie die englische Version.

HwStorTimer routine

The HwStorTimer routine is called after the interval that is specified when the miniport driver called StorPortNotification with the RequestTimerCall NotificationType value.

Syntax


HW_TIMER HwStorTimer;

VOID HwStorTimer(
  IN PVOID DeviceExtension
)
{ ... }

Parameters

DeviceExtension

A pointer to the miniport driver's per HBA storage area.

Return value

None

Remarks

The name HwStorTimer is only a placeholder. The actual prototype of this routine is defined in Srb.h as follows:


typedef
VOID
HW_TIMER (
  _In_ PVOID  DeviceExtension
  );

A HwStorTimer routine is optional.

Examples

To define an HwStorTimer callback function, you must first provide a function declaration that identifies the type of callback function you’re defining. Windows provides a set of callback function types for drivers. Declaring a function using the callback function types helps Code Analysis for Drivers, Static Driver Verifier (SDV), and other verification tools find errors, and it’s a requirement for writing drivers for the Windows operating system.

For example, to define a HwStorTimer callback routine that is named MyHwTimer, use the HW_TIMER type as shown in this code example:


HW_TIMER MyHwTimer;

Then, implement your callback routine as follows:


_Use_decl_annotations_
VOID
MyHwTimer (
  _In_ PVOID  DeviceExtension
  );
  {
      ...
  }

The HW_TIMER function type is defined in the Storport.h header file. To more accurately identify errors when you run the code analysis tools, be sure to add the _Use_decl_annotations_ annotation to your function definition. The _Use_decl_annotations_ annotation ensures that the annotations that are applied to the HW_TIMER function type in the header file are used. For more information about the requirements for function declarations, see Declaring Functions Using Function Role Types for Storport Drivers. For information about _Use_decl_annotations_, see Annotating Function Behavior.

Requirements

Header

Storport.h (include Storport.h)

See also

StorPortNotification

 

 

Send comments about this topic to Microsoft

Anzeigen:
© 2014 Microsoft. Alle Rechte vorbehalten.