// 마지막 에러 메시지를 디버그창에 보여준다.
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;
}

















