Program Execution

A Windows CE-based program consists of an application file (sometimes called the executable), which has the file extension .exe, and any dynamic link libraries (DLLs) that the application file calls during execution. The calling application provides the stack, global memory, and file handles for DLL function calls.

An executable file links to a DLL in one of the following ways:

  • Implicitly. The application file that is using the DLL links to an import library (.lib) file provided by the creator of the DLL. The operating system (OS) loads the DLL and the application simultaneously. The application calls the DLL's exported functions just as if the functions were contained within the executable. This is also known as load-time dynamic linking.
  • Explicitly. The application that is using the DLL makes function calls to explicitly load and unload the DLL, and to access the DLL's exported functions. The application must call the exported functions through a function pointer. This is also known as run-time dynamic linking.

Note Separate applications can link to the same DLL using either method.

The LoadLibrary function maps the specified DLL into the address space of the calling process. The function returns a handle that the process can then use to call GetProcAddress to obtain the address of a specific exported DLL function. The LoadResource function returns a handle to a specific resource located in a DLL. For more information about these and other kernel functions that support DLLs, see DLL Reference.

A DLL placed into ROM when a platform is built can be replaced by a newer version added to RAM at a later time. For more information, see Replaceable ROM DLLs.

See Also

Migrating from an Open Source Platform to Windows CE | Loader

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.