Share via


Filtering Local Variables in the NDIS Miniport Driver PhyDetect and SetupPhy Functions

Other versions of this page are also available for the following:

8/28/2008

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 Embedded 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 Embedded CE NDIS miniport driver.

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

  6. Build the Windows Embedded 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

Tasks

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