Freigeben über


Register Miniport Driver Entry Points for NDIS 6.0 (Compact 2013)

3/26/2014

Register your miniport driver's entry points by setting members of the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure to the addresses of your driver's entry point functions. When you port a miniport driver from NDIS 5.x to NDIS 6.0, you replace NDIS 5.x driver entry point functions with equivalent NDIS 6.0 driver entry point functions and define new entry point functions required by NDIS 6.0.

The following table shows which API elements and driver entry points have been renamed and/or changed for NDIS 6.0.

NDIS 5.x

NDIS 6.0

NDIS_MINIPORT_CHARACTERISTICS

NDIS_MINIPORT_DRIVER_CHARACTERISTICS

MiniportInitialize

MiniportInitializeEx

MiniportHalt

MiniportHaltEx

MiniportPnPEventNotify

MiniportDevicePnPEventNotify

MiniportShutdown

MiniportShutdownEx

MiniportCheckForHang

MiniportCheckForHangEx

MiniportReset

MiniportResetEx

MiniportQueryInformation
MiniportSetInformation

MiniportOidRequest

NdisMRegisterUnloadHandler

(Register in NDIS_MINIPORT_DRIVER_CHARACTERISTICS)

MiniportSendPackets

MiniportSendNetBufferLists
MiniportCancelNetBufferLists

MiniportReturnPacket

MiniportReturnNetBufferLists

To register miniport driver entry points for NDIS 6.0

  1. Replace the NDIS 5.xMiniportInitialize function with the NDIS 6.0 MiniportInitializeEx function. For example:

    MyMDC.InitializeHanderEx = MyMiniportInitializeEx;
    

    In the preceding example, MyMiniportInitializeEx is the initialization function that you define for your NDIS driver. Note that the NDIS 6.0 MiniportInitializeEx function does not have the same parameters as the NDIS 5.xMiniportInitialize function. For more information about how to define MiniportInitializeEx, see Update Miniport Adapter Initialization, Halt, and Shutdown Functionality for NDIS 6.0.

  2. Replace the NDIS 5.xMiniportHalt function with the NDIS 6.0 MiniportHaltEx function. For example:

    MyMDC.HaltHandler = MyMiniportHaltEx;
    

    The parameter list of the NDIS 6.0 MiniportHaltEx function differs from that of MiniportHalt. For more information about how to port your driver to support MiniportHaltEx, see Update Miniport Adapter Initialization, Halt, and Shutdown Functionality for NDIS 6.0.

  3. Replace the NDIS 5.xMiniportPnPEventNotify function with the NDIS 6.0 MiniportDevicePnPEventNotify function. For example:

    MyMDC.DevicePnPEventNotifyHandler = MyMiniportDevicePnPEventNotify;
    

    For more information about how to define the MiniportDevicePnPEventNotify function for NDIS 6.0, see Port Plug and Play Event Notification Handling to NDIS 6.0.

  4. Replace the NDIS 5.xMiniportShutdown function with the NDIS 6.0 MiniportShutdownEx function. In NDIS 5.x, you registered this function in the AdapterShutdownHandler member of the NDIS 5.xNDIS_MINIPORT_CHARACTERISTICS structure. However, in NDIS 6.0 you register your MiniportShutdownEx function with the ShutdownHandlerEx member of the driver characteristics structure as shown in the following example:

    MyMDC.ShutdownHandlerEx = MyMiniportShutdownEx;
    

    For more information about how to port your driver to support MiniportShutdownEx, see Update Miniport Adapter Initialization, Halt, and Shutdown Functionality for NDIS 6.0.

  5. Replace the NDIS 5.xMiniportCheckForHang function with the NDIS 6.0 MiniportCheckForHangEx function. For example:

    MyMDC.CheckForHangHandlerEx = MyMiniportCheckForHangEx;
    

    For more information about how to define the MiniportCheckForHangEx function for NDIS 6.0, see Check for Adapter Hang and Reset in NDIS 6.0.

  6. Replace the NDIS 5.xMiniportReset function with the NDIS 6.0 MiniportResetEx function. In NDIS 5.x, you registered this function in the ResetHandler member of the NDIS 5.xNDIS_MINIPORT_CHARACTERISTICS structure. However, in NDIS 6.0 you register this function with the ResetHandlerEx member of the miniport driver characteristics structure as shown in the following example:

    MyMDC.ResetHandlerEx = MyMiniportResetEx;
    

    For more information about how to define the MiniportResetEx function for NDIS 6.0, see Check for Adapter Hang and Reset in NDIS 6.0.

  7. Remove code that registers the NDIS 5.xMiniportQueryInformation and MiniportSetInformation functions and replace it with code that registers your driver's MiniportOidRequest function. For example:

    MyMDC.OidRequestHandler = MyMiniportOidRequest;
    

    For more information about how to define the MiniportOidRequest function for NDIS 6.0, see Implement Miniport Driver OID Request Handling for NDIS 6.0.

  8. To register optional services, specify a MiniportSetOptions function as shown in the following example:

    MyMDC.SetOptionsHandler = MyMiniportSetOptions;
    

    For more information about registration of optional services, see MiniportSetOptions.

  9. Define a driver unload entry point. To register an unload entry point function, NDIS 6.0 drivers do not call the NDIS 5.xNdisMRegisterUnloadHandler function. Instead, NDIS 6.0 miniport drivers must specify a driver unload function in the NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure. For example:

    MyMDC.UnloadHandler = MyMiniportUnload;
    

    For more information about the driver unload function, see Add Miniport Driver Unload Functionality for NDIS 6.0.

  10. Upgrade send and receive functionality for NDIS 6.0. NDIS 6.0 replaces the NDIS 5.xMiniportSendPackets function with the new MiniportSendNetBufferLists function. Also, you must implement a MiniportCancelSend function to cancel the transmission of a buffer list structure. Similarly, the NDIS 5.xMiniportReturnPacket function has been replaced with the MiniportReturnNetBufferLists function. For more information about NDIS 6.0 send and receive functions, see Update Miniport Driver Send and Receive Functionality for NDIS 6.0. Specify the send, cancel, and receive functions in the miniport driver characteristics structure as shown in the following example:

    MyMDC.SendNetBufferListsHandler   = MyMiniportSendNetBufferLists;
    MyMDC.CancelSendHandler           = MyMiniportCancelSendNetBufferLists;
    MyMDC.ReturnNetBufferListsHandler = MyMiniportReturnNetBufferLists;
    

Note that the NDIS 6.0 NDIS_MINIPORT_DRIVER_CHARACTERISTICS structure does not have HandleInterruptHandler and ISRHandler members (these are present in the NDIS 5.xNDIS_MINIPORT_CHARACTERISTICS structure). To register interrupt entry point functions with NDIS 6.0, call the NdisMRegisterInterruptEx function and specify interrupt entry point functions in the NDIS_MINIPORT_INTERRUPT_CHARACTERISTICS structure. For more information about how to port interrupt-handling functionality, see Modify Miniport Driver Interrupt Functionality for NDIS 6.0.

See Also

Concepts

Convert Miniport Driver Initialization for NDIS 6.0