NdisGetDriverHandle function

Note   NDIS 5. x has been deprecated and is superseded by NDIS 6. x. For new NDIS driver development, see Network Drivers Starting with Windows Vista. For information about porting NDIS 5. x drivers to NDIS 6. x, see Porting NDIS 5.x Drivers to NDIS 6.0.

NdisGetDriverHandle retrieves a handle to the miniport driver that owns the adapter port that is referenced by a caller-supplied handle.

Syntax

VOID NdisGetDriverHandle(
  _In_  NDIS_HANDLE  NdisBindingHandle,
  _Out_ PNDIS_HANDLE NdisDriverHandle
);

Parameters

  • NdisBindingHandle [in]
    Pointer to a handle to the bound adapter port for which a handle to the miniport driver is to be retrieved. Typically, NdisBindingHandle is returned by NdisOpenAdapter.

  • NdisDriverHandle [out]
    Pointer to a caller-supplied variable. If the call succeeds, NdisGetDriverHandle returns a handle to a miniport driver in this caller-supplied variable. This miniport driver exports the bound adapter port that is specified by NdisBindingHandle.

Return value

None

Remarks

An adapter port is exposed in the NdisBindingHandle binding. A protocol driver uses NdisGetDriverHandle to retrieve a handle to the miniport driver that owns this adapter port. The protocol driver cannot use the handle to the miniport driver for any purpose other than identifying the miniport driver for a given binding.

A protocol driver retrieves the same handle to the miniport driver in NdisDriverHandle for all bindings to adapter ports that are exported by the same miniport driver. A protocol driver typically uses NdisGetDriverHandle to check if two bound adapter ports that were opened by the protocol are owned by the same miniport driver.

Requirements

Target platform

Universal

Version

Not supported for NDIS 6.0 drivers in Windows Vista. Supported for NDIS 5.1 drivers in Windows Vista and Windows XP.

Header

Ndis.h (include Ndis.h)

Library

Ndis.lib

IRQL

<= DISPATCH_LEVEL

See also

NdisOpenAdapter

 

 

Send comments about this topic to Microsoft