---------------------------------------------------------------------------
| 409 | } |
| 410 | //--------------------------------------------------------------------------- |
| 411 | String 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 |
nothing calls this directly
no outgoing calls
no test coverage detected