Article ID: 258827 - Last Review: January 11, 2001 - Revision: 1.0 INFO: Visual Basic Object Browser Cannot See the Default InterfaceThis article was previously published under Q258827 SUMMARY
A Visual Basic class module can implement Component Object Model (COM) interfaces described in a type library by using the Implements keyword. When the interface that is implemented happens to be the default interface, Visual Basic's Object Browser uses the CoClass name as an alias to the default interface name. Therefore, the Object Browser cannot see the default interface name. This behavior is by design. MORE INFORMATION
Visual Basic uses the class module name as an alias for the default interface; that is, the Visual Basic compiler maps the class name to the default interface reference silently for you. For detailed information regarding the mapping, please see the related article listed in the "References" section. While this transparent mapping works well in Visual Basic, the Object Browser could interpret the COM type library incorrectly when the implemented interface happens to be the default one. All default interface references are displayed as their corresponding CoClass names instead, because Visual Basic uses the CoClass name as an alias for the default interface reference to access it. For a type library from the following IDL file, the Object Browser cannot see the default interface IClass2: In addition, when multiple CoClasses implement the same interface as a default one, the Object Browser uses the first occurring CoClass name for any reference to the default interface. This is by design. REFERENCESFor additional information on how Visual Basic maps class names to the default interface, click the article number below
to view the article in the Microsoft Knowledge Base:
259529
(http://support.microsoft.com/kb/259529/EN-US/
)
INFO: How Visual Basic Classes Map to COM
| Article Translations
|
Back to the top
