The information in this article applies to:
SUMMARY
This article describes some common causes of the OLE Automation error -
2147352573 (80020003 hex) and suggested troubleshooting steps.
MORE INFORMATIONCause 1You are calling IDispatch::Invoke() with wFlags set only to DISPATCH_METHOD and the dispid identifies a property.Resolution 1The Win32 SDK documentation for IDispatch::Invoke() states that if the dispid represents a property, you must also set the DISPATCH_PROPERTYGET flag. This problem commonly occurs when you use Microsoft Visual C++ to generate class wrappers from the Microsoft Office 95 type libraries. You have to explicitly modify the generated .cpp file for any InvokeHelper() call that retrieves a property to use the DISPATCH_PROPERTGET flag. If you use the Microsoft Office 97 type libraries, this is done automatically by the Microsoft Visual C++ Class Wizard.Cause 2You are using the wrong IDispatch pointer.Resolution 2This typically occurs when you use OLE Automation with the Microsoft Office 97 applications, or any application that has a hierarchical object model. You may have initialized a COleDispatchDriver class, representing an object X, with the IDispatch pointer for an object Y. This error may or may not occur with Microsoft Office 95, or other applications with only one IDispatch implementation. This is because object X and object Y could both be implemented through one IDispatch interface, and thus no conflict will occur.Cause 3You are using an invalid dispid.Resolution 3The server does not recognize the dispid you have specified in the call to IDispatch::Invoke(). Verify that this is the correct dispid, possibly through IDispatch::GetIDsOfNames().REFERENCES
For more information on IDispatch or OLE Automation, read Tech note TN039
"MFC/OLE Automation Implementation."
Additional query words:
Keywords : kbfaq |
Last Reviewed: October 5, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |