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. |
NdisIMRegisterLayeredMiniportregisters an intermediate driver's Miniport XXXentry points and name with the NDIS library when the driver initializes.
NDIS_STATUS NdisIMRegisterLayeredMiniport( IN NDIS_HANDLE NdisWrapperHandle, IN PNDIS_MINIPORT_CHARACTERISTICS MiniportCharacteristics, IN UINT CharacteristicsLength, OUT PNDIS_HANDLE DriverHandle );
Parameters
typedef struct _NDIS_MINIPORT_CHARACTERISTICS {
UCHAR MajorNdisVersion; UCHAR MinorNdisVersion; UINT Reserved;
W_CHECK_FOR_HANG_HANDLER CheckForHangHandler;
W_DISABLE_INTERRUPT_HANDLER DisableInterruptHandler;
W_ENABLE_INTERRUPT_HANDLER EnableInterruptHandler; W_HALT_HANDLER
HaltHandler; W_HANDLE_INTERRUPT_HANDLER HandleInterruptHandler;
W_INITIALIZE_HANDLER InitializeHandler; W_ISR_HANDLER ISRHandler;
W_QUERY_INFORMATION_HANDLER QueryInformationHandler;
W_RECONFIGURE_HANDLER ReconfigureHandler; W_RESET_HANDLER
ResetHandler; W_SEND_HANDLER SendHandler; W_SET_INFORMATION_HANDLER
SetInformationHandler; W_TRANSFER_DATA_HANDLER TransferDataHandler;
// // MajorNdisVersion must be set to 0x04 with following members
// W_RETURN_PACKET_HANDLER ReturnPacketHandler;
W_SEND_PACKETS_HANDLER SendPacketsHandler;
W_ALLOCATE_COMPLETE_HANDLER AllocateCompleteHandler; }
NDIS_MINIPORT_CHARACTERISTICS,
*PNDIS_MINIPORT_CHARACTERISTICS;
An NDIS intermediate driver should initialize this structure with zeros before setting up any of the following members:
If the driver supports multipacket sends or media-specific information, it sets the SendPacketsHandlermember instead and sets this member to NULL.
If the driver includes the build instruction NDIS40_MINIPORT in its sources or if the driver writer uses the NDIS40_MINIPORT compiler switch, this parameter is set when the driver is built.
Return Values
NdisIMRegisterLayeredMiniportreturns NDIS_STATUS_SUCCESS if it registered the caller as a miniport, or it can return one of the following status values:
Comments
Any NDIS intermediate driver that exports both Miniport XXXand Protocol XXXfunctions usually sets up a characteristics structure and calls NdisIMRegisterLayeredMiniportfrom its DriverEntryfunction after DriverEntrycalls NdisMInitializeWrapper. This structure is copied in the NdisIMRegisterLayeredMiniportrequest to the NDIS library's internal storage. Thus, once it has registered, such a driver cannot change its handler functions.
After such an NDIS intermediate driver has called NdisIMRegisterLayeredMiniportsuccessfully, it must call NdisRegisterProtocolto register its Protocol XXXfunctions with the NDIS library. Such a driver usually has both ProtocolBindAdapterand ProtocolUnbindAdapterfunctions. Its ProtocolBindAdapterfunction will be called next when the underlying network adapter driver has initialized successfully. ProtocolBindAdapterthen can establish a binding to that network adapter driver with NdisOpenAdapter.
An intermediate driver can call NdisMRegisterMiniportinstead of NdisIMRegisterLayeredMiniportif it is prepared for an immediate call to the MiniportInitializefunction.
Requirements
Runs on | Versions | Defined in | Include | Link to |
---|---|---|---|---|
Windows CE OS | 3.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.
See Also