카테고리 없음2015. 5. 21. 10:47

LPVOID lpMsgBuf;

DWORD dwError = GetLastError(); 


FormatMessage(

FORMAT_MESSAGE_ALLOCATE_BUFFER | 

FORMAT_MESSAGE_FROM_SYSTEM |

FORMAT_MESSAGE_IGNORE_INSERTS,

NULL,

dwError,

MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),

(LPTSTR) &lpMsgBuf,

0, NULL );


::OutputDebugString((LPCTSTR)lpMsgBuf);


LocalFree(lpMsgBuf);


[참고 : Retrieving the Last-Error Code]


Posted by 좋은나무