This function initializes a work-queue item with a caller-supplied context and callback routine to be queued for execution when a system worker thread is given control.

VOID NdisInitializeWorkItem(
  NDIS_PROC Routine,
  PVOID Context


  • WorkItem
    [in] Points to the caller-supplied storage to be initialized.

  • Routine
    [in] Specifies the entry point of a caller-supplied function that processes this work item when it is dequeued. This callback is declared as follows.

        IN struct _NDIS_WORK_ITEM *  pWorkItem,
        IN PVOID  Context
  • Context
    [in] Points to a caller-supplied context area that is passed, not interpreted, to the callback as its only parameter. This area should be in resident memory and accessible in any arbitrary thread context in which the callback might be run subsequently. In particular, Context cannot point to the stack.

Return Values



NdisInitializeWorkItem initializes Item with pointers to Routine and Context and a NULL list pointer.

In general, only higher-level drivers queue worker thread items.

A NIC miniport that is not deserialized should never call an NdisXXXWorkItem function.

The given Routine is responsible for calling NdisFreeMemory to release the storage for Item.


OS Versions: Windows CE .NET 4.0 and later.
Header: Ndis.h.

See Also

NdisFreeMemory | NdisScheduleWorkItem

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.