//For displaying Error With ErrorCode :
void ShowError(HRESULT hr)
{
if (FAILED(hr))
{
TCHAR szErr[MAX_ERROR_TEXT_LEN];
TCHAR szNumber[20];
DWORD res = AMGetErrorText(hr, szErr, MAX_ERROR_TEXT_LEN);
if (res == 0)
{
wsprintf(szErr, "Unknown Error: 0x%2x", hr);
}
wsprintf(szNumber," :0x%2x",hr);
strcat(szErr,szNumber);
MessageBox(0, szErr, TEXT("Error!"), MB_OK | MB_ICONERROR);
}
}
Wednesday, April 25, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment