Microsoft Windows CE 3.0  

NdisRegisterProtocol

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function registers an NDIS driver's Protocol_* entry points and name with the NDIS library when the driver initializes.

VOID
NdisRegisterProtocol(
OUT PNDIS_STATUS
Status
,
OUT PNDIS_HANDLE
NdisProtocolHandle
,
IN PNDIS_PROTOCOL_CHARACTERISTICS
ProtocolCharacteristics
,
IN UINT
CharacteristicsLength
);

Parameters

Status
Pointer to a caller-supplied variable that can be one of the following values on return from this function:
Value Description
NDIS_STATUS_SUCCESS The NDIS library registered the caller as a protocol driver.
NDIS_STATUS_BAD_CHARACTERISTICS The CharacteristicsLengthis too small for the MajorNdisVersionspecified in the buffer at ProtocolCharacteristics.
NDIS_STATUS_BAD_VERSION The MajorNdisVersionspecified in the buffer at ProtocolCharacteristicsis invalid.
NDIS_STATUS_RESOURCES A shortage of resources, possibly memory, prevented the NDIS library from registering the caller.
NdisProtocolHandle
Pointer to a caller-supplied variable in which this function returns a handle representing the registered driver.
ProtocolCharacteristics
Pointer to an NDIS_PROTOCOL_CHARACTERISTICSstructure set up by the caller.
CharacteristicsLength
Specifies the size, in bytes, of the structure at ProtocolCharacteristics. If the build directive NDIS40 is specified in the sources ahead of #include ndis.h, this value is supplied automatically.

Remarks

The value supplied at CharacteristicsLengthmust be at least the sizeof(NDIS XXX_PROTOCOL_CHARACTERISTICS) designated by the supplied MajorNdisVersionin this structure.

For best performance, a protocol that layers itself above an NIC driver that supports multipacket receives should provide a ProtocolReceivePacketfunction. An NIC driver that supports multipacket sends is also likely to indicate multipacket receives. A driver that provides a ProtocolReceivePacketfunction must also provide a ProtocolReceivefunction.

After a successful call to this function, a driver cannot alter the set of Protocol XXXfunctions that it supplied.

A successfully registered driver saves the handle returned at NdisProtocolHandle. It is a required parameter to other NDIS functions that the driver calls subsequently.

After a successful call to this function, the driver can call the NdisOpenAdapterfunction to set up a binding to the underlying NIC driver or to layer itself above any NDIS driver that registered a set of NDIS upper-edge ( Miniport XXX) functions.

A driver that calls this function runs at IRQL PASSIVE_LEVEL.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Ndis.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

NdisDeregisterProtocol, NdisInitializeString, NdisInitUnicodeString, NdisOpenAdapter, NdisZeroMemory



 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.