Typically, the functions you define in your application do not require any special treatment. There are two exceptions to this rule:
Functions in a dynamic-link library that are called outside of the library
Callback functions (also called callback procedures)
For information about writing functions in a dynamic-link library, see Chapter 20, “Dynamic-Link Libraries.”
Callback functions are functions in your application that are called by Windows, not by your application. Following are the common types of callback functions:
WinMain. This is the entry point for your application.
Application window procedures. These procedures process messages sent to the window.
Application dialog box procedures. These procedures process messages sent to the dialog box.
Enumeration callback functions. These functions handle the results of Windows enumeration functions.
Memory-notification functions. These functions are called by Windows to notify your application that a memory object is about to be discarded.
Window-hook functions (filters). These functions process messages sent to the windows of other applications. Most window-hook functions must be in a library.