8/28/2008
You can migrate a Network Driver Interface Specification (NDIS) miniport driver from a Windows-based desktop platform to Windows Embedded CE with a minimal amount of changes. Many of the changes involve conditionally compiling NDIS miniport driver functionality that Windows Embedded CE does not support. For portability between Windows-based desktop platforms and Windows Embedded CE, Microsoft recommends that you make changes to your driver to enable it to build in the Microsoft® Platform Builder development tool and with a driver development kit (DDK) for Windows-based desktop platforms.
The NDIS wrapper is a dynamic-link library (DLL) that facilitates developing and migrating NDIS miniport drivers by abstracting portions of the OS and by providing supporting functions.
To complete the following procedure, Microsoft used a Windows-based desktop driver that supports the Intel EtherExpress PRO/100+** Ethernet PCI adapter and Intel EtherExpress PRO/100B** PCI adapter (E100BEX). You can obtain the sample source code for the E100BEX driver by installing the Windows XP DDK.
Note: |
|---|
|
Beginning with Windows CE 5.0, a Windows Embedded CE driver for the E100BEX driver is included with the operating system. The steps in this how-to document are largely illustrative.
|
These are the major differences between the NDIS miniport drivers for the Windows-based desktop platforms and Windows Embedded CE:
-
Windows Embedded CE NDIS miniport drivers are .dll files, but NDIS miniport drivers for Windows-based desktop platforms are .sys files.
-
Windows Embedded CE NDIS miniport drivers must expose the DriverEntry function.
-
Windows Embedded CE does not use the lower 64 KB of the I/O address space.
Do not use 16 bit values for I/O port addresses.
-
The Windows Embedded CE NDIS implementation does not support the EISA or MCA busses.
Do not use the NdisOverRideBusNumber and NdisReadMcaPosInformation functions.
-
The Windows Embedded CE NDIS implementation does not support direct memory access (DMA).
Do not use the NdisSetupDmaTransfer, NdisCompleteDmaTransfer, NdisMRegisterDmaChannel, NdisMDeregisterDmaChannel, NdisMAllocateMapRegisters, NdisMFreeMapRegisters, NdisMReadDmaCounter, and NdisGetSharedDataAlignment functions.
Use the NdisMAllocateSharedMemory and NdisMFreeSharedMemory functions for PCI bus master DMA transfers.
-
In Windows Embedded CE, the NdisInitializeEvent function requires the NdisFreeEvent function, and the NdisInitializeReadWriteLock function requires the NdisFreeReadWriteLock function.
-
In Windows Embedded CE, avoid unaligned I/O and memory access.
You might need to rearrange structures or conditionally define another type with the UNALIGNED keyword.
-
In Windows Embedded CE, for delays greater than 50 microseconds, use the NdisMSleep function, rather than the NdisStallExecution function. NdisStallExecution requires a QueryPerformanceCounter implementation for your target device.
Hardware and Software Assumptions
**The non-Microsoft software and hardware referenced in these documents are included for illustrative purposes only.
Illustrations that use such third-party software and hardware as examples are not intended to be an endorsement or recommendation of any of these products.
We provide this information only as a convenience for our customers for purposes of explaining a practical application and do not provide warranties of any kind, whether express, implied or statutory, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.
Tasks
Troubleshooting a Device Driver
Concepts
Miniports, Intermediate Drivers, and Protocol Drivers
Other Resources
How-to Topics
Network Drivers