2012. 12. 18. 03:08
프로그래밍/Windows API
나중에 Copy & Paste 신공을 위해서 코드를 적어둠...
DWORD err; // Error Code
TCHAR errMes[1024]; // Error Message Buffer
// Do something here that can fail
err = GetLastError();
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, errMes, 1024, NULL);
wsprintf(str, "Error Code = %d, Message = %s", err, errMes);
MessageBox(hWnd, str, "ERROR", MB_OK");
'프로그래밍 > Windows API' 카테고리의 다른 글
윈도우 메모리 파이널! (0) | 2011.03.12 |
---|---|
윈도우 메모리 - 4 (힙과 메모리 맵) (0) | 2011.03.12 |
윈도우 메모리 - 3 (VirtualAlloc) (0) | 2011.03.11 |
윈도우 메모리 - 2 (malloc 함수) (2) | 2011.03.11 |
윈도우 메모리 - 1 (0) | 2011.03.10 |