Adding the Windows-based Desktop NDIS Miniport Driver to the Run-Time Image Build (Windows CE 5.0)

Windows CE 5.0
Send Feedback

Before building the Windows-based desktop NDIS miniport driver in Platform Builder, add it to your Workspace.

To add the Windows-based desktop NDIS miniport driver to the run-time image build

  1. Navigate to the directory containing your Windows desktop-based NDIS miniport driver, and copy all .c and .h files to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    Replace CENDISMiniport with an appropriate directory name for your Windows CE-based NDIS miniport driver.

  2. Add an entry for the CENDISMiniport directory to the Dirs file in %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers.
  3. Add a Sources file to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    In the following sources file example for the E100BEX driver, miniport_test is the name of the OS design created with Platform Builder, and CEPC is %_TGTPLAT%.

    TARGETNAME=e100bex
    
    TARGETTYPE=DYNLINK
    
    DLLENTRY=DllEntry
    
    CDEFINES=$(CDEFINES) -DNDIS_MINIPORT_DRIVER -DNDIS51_MINIPORT=1
    
    #
    # if define LBFO then undefine OFFLOAD
    # if define OFFLOAD then undefine LBFO, LBFO and OFFLOAD cannot both be defined
    # default LBFO and OFFLOAD are not defined
    #
    
    #CDEFINES=$(CDEFINES) -DLBFO=1
    
    #CDEFINES=$(CDEFINES) -DOFFLOAD
    
    #CDEFINES=$(CDEFINES) -DWINCE_PM_ENABLE
    
    CDEFINES=$(CDEFINES) -DUSE_SEND_RCV_LOCKS
    
    TARGETLIBS= \
    $(_PROJECTSDKROOT)\lib\x86\retail\coredll.lib    \
    $(_PROJECTOAKROOT)\lib\x86\retail\ceddk.lib    \
    $(_PROJECTOAKROOT)\lib\x86\retail\netmui.lib    \
    $(_PROJECTSDKROOT)\lib\x86\retail\ndis.lib
    
    SOURCES = \
       mp_main.c  \
       offload.c  \
       mp_init.c  \
       mp_req.c   \
       mp_nic.c   \
       mp_dbg.c   \
       eeprom.c   \
       physet.c   \
       routines.c
    
    #  WINCETARGETFILE0 must match the def file name.
    WINCETARGETFILE0=e100bex.def
    
  4. Add a Makefile file to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    The following code example shows a Makefile file. All Windows CE-based Makefile files are identical.

    !INCLUDE $(_MAKEENVROOT)\makefile.def
    
  5. Expose the NDIS miniport driver entry point by adding a .def file to %_WINCEROOT%\Platform\%_TGTPLAT%\Drivers\CENDISMiniport.

    The following code example shows a .def file from the E100BEX driver.

    LIBRARY         e100bex
    
    EXPORTS         DriverEntry
    
  6. Add an entry for the E100BEX driver to the MODULES section of the Project.bib file.

    The following code example shows the MODULES section entry for the E100BEX driver.

    e100bex.dll       $(_FLATRELEASEDIR)\e100bex.dll            NK  SH
    
  7. Add registry keys to Project.reg.

    The following registry example shows the registry keys for the E100BEX driver.

    [HKEY_LOCAL_MACHINE\Comm\e100bex]
       "DisplayName"="Intel 82559"
       "Group"="NDIS"
       "ImagePath"="E100BEX.dll"
    
    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\PCI\Template\E100BEX]
       "Dll"="NDIS.dll"
       "Class"=dword:02
       "SubClass"=dword:00
       "ProgIF"=dword:0
       "VendorID"=multi_sz:"8086"
       "DeviceID"=multi_sz:"1229"
       "Prefix"="NDS"
       "IsrDll"="giisr.dll"
       "IsrHandler"="ISRHandler"
       "PortIsIO"=dword:1
       "PortOffset"=dword:0
       "PortSize"=dword:2
       "PortMask"=dword:F300
    
  8. From the IDE Build menu, choose Open Build Release Directory.
  9. Navigate to the directory containing your Windows CE NDIS miniport driver.

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

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


Show: