3.2 Alphabetical Listing of Global Functions

To find additional discussion and examples for a global function, see the preceding table, using the category specified in the function description below. Functions that are documented in this section are indicated by the phrase “Details follow.”

AfxAbort

The default function called by AfxTerminate.

For additional information, see the Exceptions category in the table.

AfxCheckMemory

Checks all currently allocated memory for corrupted guard bytes.

For additional information, see the Diagnostics category in the table.

AfxDoForAllClasses

Performs a specified function on all classes derived from CObject that support run-time type checking and are used by the running program.

For additional information, see the Diagnostics category in the table.

AfxDoForAllObjects

Performs a specified function on all objects derived from CObject that support run-time type checking and are used by the running program.

For additional information, see the Diagnostics category in the table.

AfxEnableMemoryTracking

Turns memory tracking on and off.

For additional information, see the Diagnostics category in the table.

AfxGetApp

Returns a pointer to the application's one CWinApp object. Details follow.

AfxGetAppName

Returns a string containing the application's name. Details follow.

AfxGetInstanceHandle

Returns a HANDLE to the current instance of the application. Details follow.

AfxGetResourceHandle

Returns a HANDLE to the current instance of the application. Use this handle to access the application's resources directly. Details follow.

AfxIsMemoryBlock

Verifies that a memory block has been properly allocated.

For additional information, see the Diagnostics category in the table.

AfxIsValidAddress

Verifies that a memory block is within the program's bounds.

For additional information, see the Diagnostics category in the table.

AfxRegisterWndClass

Registers a Windows window class to supplement those registered automatically by the library. Details follow.

For additional information, see the Class Libraries User's Guide, Chapter 14, “Window Management.”

AfxSetAllocHook

Enables the calling of a function on each memory allocation.

For additional information, see the Diagnostics category in the table.

AfxSetAllocStop

Enables the calling of a function on the nth memory allocation.

For additional information, see the Diagnostics catgeory in the table.

AfxSetTerminate

Sets the final destination of calls to AfxTerminate.

For additional information, see the Exceptions category in the table.

AfxTerminate

Called internally if there is no applicable TRY/CATCH frame in effect.

For additional information, see the Exceptions category in the table.

AfxThrowArchiveException

Throws an archive exception.

For additional information, see the Exceptions category in the table.

AfxThrowFileException

Throws a file exception.

For additional information, see the Exceptions category in the table.

AfxThrowMemoryException

Throws a memory exception.

For additional information, see the Exceptions category in the table.

AfxThrowNotSupportedException

Throws a not-supported exception.

For additional information, see the Exceptions category in the table.

AfxThrowResourceException

Throws a Windows resource-not-found exception.

For additional information, see the Exceptions category in the table.