What is the FunctionContext parameter to NdisInitializeTimer used for?
VOID NdisIntiializeTimer( PNDIS_TIMER Timer, PNDIS_TIMER_FUNCTION TimerFunction, PVOID FunctionContext ); VOID NdisMIntiializeTimer( PNDIS_MINIPORT_TIMER Timer, NDIS_HANDLE MiniportAdapterHandle, PNDIS_TIMER_FUNCTION TimerFunction, PVOID FunctionContext ); In some (actually, many or most…) NDIS MAC drivers it is desirable to use common driver code to support multiple installed adapters. The driver functions to be performed for each adapter are identical; it is only the adapter “context”, including it’s hardware resources and instance-specific data, that is different. The Microsoft Windows NT DDK NE32000 MAC driver sample illustrates a good use of the FunctionContext parameter when calling NdisMInitializeTimer. For the NE3200, a structure called a NE3200_ADAPTER contains most of the data specific to each installed NE3200 adapter. In the call to NdisMInitializeTimer a pointer to the NE3200_ADAPTER structure is passed as FunctionContext. Later, when the NE3200ResetHandler MiniportTimer