Compartilhar via


NDIS Driver Portability (Windows CE 5.0)

Send Feedback

NDIS drivers should be written so that they are easily portable. In general, porting from one hardware platform to another should only require recompilation with a system-compatible compiler.

Driver developers should avoid calling operating system-specific functions, but rather use NDIS equivalents of such calls. If you restrict support calls to NDIS functions, your code can be more easily ported between Microsoft operating systems that support NDIS. NDIS exports a rich set of support functions for writing drivers, and it should not be necessary to call the operating system directly.

Drivers should be written in C. In additon, driver code should be restricted to the ANSI C standard and should avoid using language functionality that is not supported by other system-compatible compilers. Driver code should not be written using any functionality that the ANSI C standard designates as implementation defined.

Drivers should avoid any dependencies on data types whose size and layout vary across hardware platforms. Driver code should not call any C run-time library functions instead of NDIS-provided functions.

No floating-point operations are allowed in kernel-mode. It is a fatal error to attempt such operations.

Code to support Windows CE-based device-specific functionality should be encapsulated between #ifdef and #endif statements.

See Also

Network Driver Programming Considerations

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.