[DEBUG] GetLastError를 이용해 마지막 에러 내용 보이기
Posted on 2008. 5. 29. 09:56
Filed Under Visual C++
// 마지막 에러 메시지를 디버그창에 보여준다.
DWORD CDMFCommonUtil::ShowLastError(void)
{
LPVOID lpMsgBuf;
DWORD err;
err = GetLastError();
::FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
TRACE0(lpMsgBuf);
//AfxMessageBox((LPTSTR)lpMsgBuf);
::LocalFree( lpMsgBuf );
return err;
}
DWORD CDMFCommonUtil::ShowLastError(void)
{
LPVOID lpMsgBuf;
DWORD err;
err = GetLastError();
::FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
err,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
TRACE0(lpMsgBuf);
//AfxMessageBox((LPTSTR)lpMsgBuf);
::LocalFree( lpMsgBuf );
return err;
}
반응형
Lois & Clark ..
Posted on 2007. 9. 6. 10:02
Filed Under 일상
요즘 열심히 보는 중인 미국드라마 Lois & Clark..
슈퍼맨 이야기다.
꺄아~ 오빠 멋졍! >.<

슈퍼맨의 휘날리는 망토~
어렸을때 tv앞에 붙어 보던 생각나네 그려..크...
Season 1 (22편) - 워밍업!
Season 2 (22편) - 현재 여기 10편 보는중..
Season 3 (22편) - 여기부터 한글 자막이 없는 ㅠㅠ
Season 4 (22편)
반응형