Class CErrorHandler::
ErrorCodeToString()
Data ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: CErrorLog::~CErrorLogNext page: GetClassName    Show member index
Public Function Declared in:
ErrorHandler.h

'Declaration' icon -- Shortcut to top of page. Declaration

static std::string ErrorCodeToString(
    DWORD dwErrorCode);

'Description' icon -- Shortcut to top of page. Description

Convert an error code to string

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    //Get the error string
    LPVOID lpMsgBuf;
    FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
                  FORMAT_MESSAGE_FROM_SYSTEM |
                  FORMAT_MESSAGE_IGNORE_INSERTS,
                  NULL,
                  dwErrorCode,
                  MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
                  (LPTSTR) &lpMsgBuf,
                  0,
                  NULL);

    //Save it
    std::string sMessage;
    sMessage+=(char*)lpMsgBuf;

    //Release the buffer
    LocalFree(lpMsgBuf);

    //Done
    return sMessage;
}
catch (...)
{
    return "Unknown";
}

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!This web site was generated using Surveyor V4.50.811.1.  Click here for more information. Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003.