Brief Index      Full Index      Events Index      I.M. Reference

Begin_Error_Handler_Search

Functions

void Begin_Error_Handler_Search ()
void Show_Error_Handler_Count (int *count)
HC_BOOLEAN Find_Error_Handler (void(HC_CDECL **)(HC_ANY_ARGS) handler)
void End_Error_Handler_Search ()

Function Documentation

void Begin_Error_Handler_Search ( )

Finds all currently defined error handlers.

DETAILS

An error handler search allows you to find all the error handlers that currently registered.

Begin_Error_Handler_Search() initiates the search.

Show_Error_Handler_Count() returns the number of error handlers found.

Find_Error_Handler() returns a function pointer, one at a time, to each of the registered error handlers.

End_Error_Handler_Search() terminates the search sequence.

Below is a code sample of how you might use these error handler search functions:

extern "C" {
typedef void (*him_function)(HC_ANY_ARGS);
}
#define HIM_FUNCTION(function) (him_function)(function)

...

	HC_Begin_Error_Handler_Search();
	{
		int count = 0;
		HC_Show_Error_Handler_Count(&count);
		void (*func)(HC_ANY_ARGS);
		while(HC_Find_Error_Handler(&func)){
			if(HIM_FUNCTION(func) == HIM_FUNCTION(MyErrorHandler)){
				AfxMessageBox(_T("Found my error handler!"));
			}
		}
	}
	HC_End_Error_Handler_Search();

NOTES

Show_Error_Handler_Count() and Find_Error_Handler() are only valid between Begin_Error_Handler_Search() and End_Handler_Search().

See also:
Define_Error_Handler
void Show_Error_Handler_Count ( int *  count)

Finds out how many error handlers will be returned.

Parameters:
count- The total number of error handlers found by Find_Error_Handler(). Returned to user. Passed by reference always.

DETAILS

No additional details. See Begin_Error_Handler_Search()

HC_BOOLEAN Find_Error_Handler ( void(HC_CDECL **)(HC_ANY_ARGS)  handler)

Retrieves the address of the registered error handlers one at a time.

Parameters:
handler- The address of the error-handling routine.
Returns:
The function returns false when all error handlers have been retrieved.

DETAILS

No additional details. See Begin_Error_Handler_Search()

void End_Error_Handler_Search ( )

Terminates the error handler search sequence and frees any memory involved.

DETAILS

No additional details. See Begin_Error_Handler_Search().

Brief Index      Full Index      Events Index      I.M. Reference