MCPcopy Create free account
hub / github.com/MaxBelkov/visualsyslog / GetErrorMessage

Method GetErrorMessage

sourcecommon/File.cpp:411–428  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

409}
410//---------------------------------------------------------------------------
411String TFile::GetErrorMessage(void)
412{
413 AnsiString rv;
414 LPVOID lpMsgBuf;
415 if( ! FormatMessage(
416 FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
417 NULL,
418 LastError,
419 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
420 (LPTSTR) &lpMsgBuf,
421 0,
422 NULL)
423 )
424 return rv;
425 rv = (LPCTSTR)lpMsgBuf;
426 LocalFree( lpMsgBuf );
427 return rv;
428}
429//---------------------------------------------------------------------------
430#pragma package(smart_init)
431

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected