ID: Q184885
The information in this article applies to:
When you call GetErrorInfo(), it returns S_OK but the pointer returned in the out parameter, IErrorInfo **pperrinfo, is invalid. When you try to make a method call through this pointer, it may result in an access violation.
GetErrorInfo() was not completely implemented, which causes the bad pointer to be returned.
For Windows CE 2.0 and earlier, rich error information through IErrorInfo is not available. Use the HRESULT returned from the automation method call to understand why the call failed. For Windows CE 2.1 and later, IErrorInfo, Get/SetErrorInfo() are implemented and can be used.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been resolved in Windows CE version 2.1 and later.
The following code fragment fails on Windows CE 2.0 when pei->GetDescription() is called:
BSTR bstrError = 0;
IErrorInfo* pei;
if (SUCCEEDED(GetErrorInfo(0, &pei)))
{
if (pei)
{
if (SUCCEEDED(pei->GetDescription(&bstrError)))
{
pei->Release();
}
}
}
Additional query words: SetErrorInfo IErrorInfo COM
Keywords : kbnokeyword kbWinCE
Version : WinCE:1.0,1.01,2.0,2.1
Issue type : kbbug
Last Reviewed: July 3, 1998