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 );
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 CharacteristicsLength is too small for the MajorNdisVersion specified in the buffer at ProtocolCharacteristics. NDIS_STATUS_BAD_VERSION The MajorNdisVersion specified in the buffer at ProtocolCharacteristics is invalid. NDIS_STATUS_RESOURCES A shortage of resources, possibly memory, prevented the NDIS library from registering the caller.
Pointer to a caller-supplied variable in which this function returns a handle representing the registered driver.
Pointer to an NDIS40_PROTOCOL_CHARACTERISTICS structure set up by the caller.
Specifies the size, in bytes, of the structure at ProtocolCharacteristics. This value is not automatically supplied in Windows CE, and must be specified.
The value supplied at CharacteristicsLength must be at least the sizeof(NDIS40_PROTOCOL_CHARACTERISTICS) designated by the supplied MajorNdisVersion in this structure. The current MajorNdisVersion is 4, and the current MinorNdisVersion is 0x00.
For best performance, a protocol that layers itself above a network adapter driver that supports multipacket receives should provide a ProtocolReceivePacket function. An network adapter driver that supports multipacket sends is also likely to indicate multipacket receives. A driver that provides a ProtocolReceivePacket function must also provide a ProtocolReceive function.
After a successful call to this function, a driver cannot alter the set of ProtocolXXX functions 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 NdisOpenAdapter function to set up a binding to the underlying network adapter driver or to layer itself above any NDIS driver that registered a set of NDIS upper-edge (MiniportXXX) functions.
|Runs on||Versions||Defined in||Include||Link to|
|Windows CE OS||2.0 and later||Ndis.h||Ndislib.lib|
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.
Last updated on Tuesday, July 13, 2004
© 1992-2000 Microsoft Corporation. All rights reserved.