Class CSpoofBase::
ReportError()
Data ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: RegisterShutdownNext page: ReportError    Show member index
Protected Function Declared in:
SpoofBase.h

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

void ReportError(
    LPCSTR lpMethod) const;

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

Report an unknown error (use GetLastError)

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

if (!GetLog())
    return;

try
{
#ifdef WIN32
    //Unknown error
    LPVOID lpMsgBuf;

    FormatMessage(
        FORMAT_MESSAGE_ALLOCATE_BUFFER |
        FORMAT_MESSAGE_FROM_SYSTEM |
        FORMAT_MESSAGE_IGNORE_INSERTS,
        NULL,
        ::GetLastError(),
        MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
        (LPTSTR) &lpMsgBuf,
        0,
        NULL);

    //Report the error
    //Get the log
    GetLog()->ReportCatchError(m_lpClassName,lpMethod,(LPSTR)lpMsgBuf);

    //Free the resources
    LocalFree(lpMsgBuf);
#else
    GetLog()->ReportCatchError(m_lpClassName,lpMethod,"Unknown error!");
#endif
}
catch (...)
{
}

'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 © 2001 Barak Weichselbaum. See the About page for additional notices. This page last updated: 27 Jun 2001.