Freigeben über


Removing Unused Local Variables from the NDIS Miniport Driver Core Functions (Windows CE 5.0)

Send Feedback

After you modify the NDIS miniport driver initialization functions, modify the NDIS miniport driver core functions.

To remove unused local variables from the NDIS miniport driver core functions

  1. In %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport, open Mp_main.c.

  2. Find the MPInitialize function definition, and then use the #ifndef and #endif directives within the local variable declarations to remove the variables that are not needed for Windows CE.

    The following code example shows how to use these directives to remove the unused variables.

    #ifndef UNDER_CE    
        NDIS_HANDLE     ConfigurationHandle;
        PVOID           NetworkAddress;
    #endif    
        UINT            index;
    #ifndef UNDER_CE
        UINT            uiPnpCommandValue;
    #endif
    
  3. Find the MPHalt function definition, and then use the #ifndef and #endif directives within the local variable declarations to remove the variables that are not needed for Windows CE.

    The following code example shows how to use these directives to remove the unused variables.

    #ifndef UNDER_CE
        BOOLEAN         bCancelled;
    #endif
    
  4. Find the MPReset function definition, and then use the #ifndef and #endif directives within the local variable declarations to remove the variables that are not needed for Windows CE.

    The following code example shows how to use these directives to remove the unused variables.

    #ifndef UNDER_CE    
        PNDIS_PACKET    Packet;
    #endif
    
  5. From the IDE Build menu, choose Open Build Release Directory.

  6. Navigate to the directory containing your Windows CE NDIS miniport driver.

    Be sure your NDIS miniport driver is in %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

  7. Build the Windows CE NDIS miniport driver with the Build tool.

    For more information about the Build tool, see Build Tool. Microsoft recommends using the -c parameter with the Build tool to delete all object files.

See Also

How to Migrate a Windows-based Desktop NDIS Miniport Driver to Windows CE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.