Required and Optional Headers (Windows CE 5.0)

Send Feedback

Developing an Application > Microsoft C Run-time Library for Windows CE > C Run-time Libraries

The description of each run-time routine includes a list of required and optional include, or header (.H), files for that routine.

Required header files must be included to obtain the function declaration for the routine or a definition used by another routine called internally.

Optional header files are usually included to take advantage of predefined constants, type definitions, or inline macros.

The following table lists examples of optional header file contents.

Definition Example
Macro definition If a library routine is implemented as a macro, the macro definition might be in a header file other than the header file for the original routine.

For instance, the towupper macro is defined in the header file Ctype.h, while the function towupper is declared in Stdlib.h.

Manifest constant Many library routines refer to constants that are defined in header files.

For instance, the _fopen routine uses constants such as _O_CREAT, which is defined in the header file Fcntl.h.

Type definition Some library routines return a structure or take a structure as an argument.

For example, stream input/output routines use a structure of type FILE, which is defined in Stdio.h.

The compiler performs type checking on any routine reference that occurs after its associated function declaration. Function declarations are especially important for routines that return a value of some type other than int, which is the default.

Routines that do not specify their appropriate return value in their declaration are considered by the compiler to return an int, which can cause unexpected results.

See Also

Microsoft C Run-time Library for Windows CE | Choosing Between Functions and Macros | Run-time Routines by Category

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.