次の方法で共有


NDIS Driver Portability (Windows Embedded CE 6.0)

1/6/2010

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 Embedded CE-based device-specific functionality should be encapsulated between #ifdef and #endif statements.

See Also

Concepts

Network Driver Programming Considerations