Description: Windows error code translation (sub) program
This program contains two Windows errors.
The first is the filter exception handling. To use the filter exception handling here, you must first introduce the source code:
# include "Exception_Debug. CPP"
Then use the following code in the program entry code:
SetUnhandledExceptionFilter (_ProcessErrDealing)
This registers a filter exception handling.
The second is the Windows error code translation, which translates the Windows error code into text. To use this feature, first introduce the source code:
# include "WindowsErrorCodes. CPP"
Then use it when you encounter a Windows error code:
Char * errtext = TranslateErrorCode(err) //err = GetLastError()
Errtext points to a string that shows the predefined values of the err number Windows error code.
For example, when you encounter a 0 Windows error, the result of calling this function is: "ERROR_SUCCESS".
Main. CPP is a main program that can be compiled in vc ++ 6.0. Think of it as a routine.
In addition, the error code recorded in this program is only part of the common Windows error code. If you find an error code that is not included in the program, you can add yourself to the windowserrorcodes.cpp.
File list (Check if you may need any files):