Microsoft KB Archive/184885

= BUG: GetErrorInfo Returns Bad Pointer =

PSS ID Number: 184885

Article Last Modified on 7/22/2003

-

The information in this article applies to:


 * Microsoft Windows CE Operating System, Versions 2.0
 * Microsoft Windows CE Operating System, Versions 1.0
 * Microsoft Windows CE 1.01
 * Microsoft Windows CE 2.01

-



This article was previously published under Q184885



SYMPTOMS
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.



CAUSE
GetErrorInfo was not completely implemented, which causes the bad pointer to be returned.



RESOLUTION
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.



STATUS
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.



Steps to Reproduce Behavior
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: kbbug KB184885

Technology: kbWinCE100 kbWinCE101 kbWinCE200 kbWinCE201 kbWinCESearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.