Microsoft Windows CE 3.0  


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 NIC or intermediate driver's Miniport_* entry points and name with the NDIS library when the driver initializes.

NDIS_STATUS NdisMRegisterMiniport(


Handle returned by the NdisMInitializeWrapperfunction.
Pointer to an NDIS_MINIPORT_CHARACTERISTICSstructure set up by the caller.

The driver should initialize this structure with 0s before setting up any its members.

Specifies the length, in bytes, of the caller-supplied characteristics buffer. Depending on the value of the MajorNdisVersionmember of NDIS_MINIPORT_CHARACTERISTICS, this parameter must be either sizeof(NDIS40_MINIPORT_CHARACTERISTICS )or sizeof(NDIS30_MINIPORT_CHARACTERISTICS ).

The driver includes the build instruction NDIS40_MINIPORT or NDIS30_MINIPORT, as appropriate, in its sources; if the driver writer uses the -DNDIS40_MINIPORT or ..30.. compiler switch, this parameter is set when the driver is built.

Return Values

NDIS_STATUS_SUCCESS indicates success. One of the following status values indicates failure:

The CharacteristicsLengthis too small for the MajorNdisVersionspecified in the buffer at MiniportCharacteristics.
The MajorNdisVersionor MinorNdisVersionspecified in the characteristics structure is invalid.
A shortage of resources, possibly memory, prevented the NDIS library from registering the caller.
This is a default error status, returned when none of the preceding errors caused the registration to fail. For example, if the NDIS library cannot load the driver's image and lock it into system memory, it returns this error.


An NIC driver calls this function from its DriverEntryfunction after DriverEntrycalls the NdisMInitializeWrapperfunction.

Every NIC driver that exports only Miniport XXXfunctions must set up a characteristics structure and call this function. This structure is copied in the request to the NDIS library's internal storage. Thus, once it has registered, a miniport driver cannot change its handler functions.

The NDIS library currently does not call MiniportReconfigurefunctions, so such a function in an existing miniport driver does nothing unless the miniport makes internal calls to its MiniportReconfigurefunction from MiniportInitialize.

After the driver has called this function, it should be prepared to be called back at the MiniportInitializeentry point specified in the characteristics structure.

NDIS intermediate drivers, which export both Miniport XXXand Protocol XXXfunctions, usually call the NdisIMRegisterLayeredMiniportfunction, instead of this function. Intermediate drivers that export only a set of Miniport XXXfunctions usually call this function.

A driver that calls this function runs at IRQL PASSIVE_LEVEL.


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


 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.