BUG: ATL Implement Interface Wizard Does Not Insert Imported Interface Information into a COM Type Library (307172)
The information in this article applies to:
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q307172 SYMPTOMS When you use the Implement Interface wizard in an Active
Template Library (ATL) project, and you select an interface from another type
library, the code that the wizard generates does not include the definition of
the implemented interface. As a result, when you call this ATL COM object from
a managed client, the call may not succeed. CAUSE If the specific type library is registered, Microsoft COM
clients can call this ATL COM object. A managed client, however, may fail
under certain circumstances because the COM Interop assembly that is generated
from this COM server does not contain the metadata for the external interface.
As a result, you cannot use late bound methods (for example, MethodInfo) to successfully call methods from this interface.
NOTE: You also cannot call methods from this interface on a remoting
proxy. RESOLUTION To work around this problem, paste the following code in
the library block of the ATL project interface definition language (.idl) file:
importlib("MyTypeLib.tlb");
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 4/11/2003 |
---|
Keywords: | kbbug kbpending kbreadme KB307172 |
---|
|