Free Source Code and Program Tips
Posts tagged Debug
Microsoft Visual C++ Tips
Nov 21st
Here are some tips of Microsoft Visual Studio 6.0. Display the LastError’s value When we want to get the LastError message, we often using the following code. 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 ); // Process any inserts in lpMsgBuf. // …