Functions | |
void | Begin_Error_Handler_Search () |
Finds all currently defined error handlers. More... | |
void | Show_Error_Handler_Count (int *count) |
Finds out how many error handlers will be returned. More... | |
HC_BOOLEAN | Find_Error_Handler (void(HC_CDECL **)(HC_ANY_ARGS) handler) |
Retrieves the address of the registered error handlers one at a time. More... | |
void | End_Error_Handler_Search () |
Terminates the error handler search sequence and frees any memory involved. More... | |
void Begin_Error_Handler_Search | ( | ) |
Finds all currently defined error handlers.
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();
Show_Error_Handler_Count() and Find_Error_Handler() are only valid between Begin_Error_Handler_Search() and End_Handler_Search().
void End_Error_Handler_Search | ( | ) |
Terminates the error handler search sequence and frees any memory involved.
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.
handler | - The address of the error-handling routine. |
No additional details. See Begin_Error_Handler_Search()
void Show_Error_Handler_Count | ( | int * | count | ) |
Finds out how many error handlers will be returned.
count | - The total number of error handlers found by Find_Error_Handler(). Returned to user. Passed by reference always. |
No additional details. See Begin_Error_Handler_Search()