Filtering Local Variables in the NDIS Miniport Driver PhyDetect and SetupPhy Functions (Windows CE 5.0)

Send Feedback

After you modify the NDIS miniport object identifier functions, modify the PhyDetect and SetupPhy functions.

To filter local variables in the NDIS miniport driver PhyDetect and SetupPhy functions

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

  2. Use DBG to conditionally declare the local variables related to debugging in the PhyDetect function definition.

    The following code example shows how to conditionally declare the local variables.

    #if DBG
        USHORT  MdiControlReg; 
        USHORT  MdiStatusReg;
    #endif
    
  3. In the SetupPhy function definition, exclude the local variables not needed by the Windows CE NDIS miniport driver.

    The following code example shows how to exclude these variables.

    #ifndef UNDER_CE    
        USHORT   LastMdiMiscReg;
    #endif
        UINT     PhyId;
        BOOLEAN  ForcePhySetting = FALSE;
    #ifndef UNDER_CE    
        UINT     i;
    #endif
    
  4. From the IDE Build menu, choose Open Build Release Directory.

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

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

  6. 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.