Microsoft KB Archive/193018

= INFO: Java and Visual C++ Cannot Access Hidden VB Interface =

Article ID: 193018

Article Last Modified on 5/13/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q193018



SUMMARY
Java and Visual C++ programs cannot access hidden Visual Basic interfaces that are defined with an underscore ( _ ) as the first letter in the name, such as the Visual Basic Collection interface declared in MSVBVM60.DLL. Problems that arise from this issue include the following:


 * The interface is hidden (with underscore as the first letter in the name) so that tools such as JCOM will skip over it.
 * The interface is only declared in the Visual Basic run-time and there are no *.h files and *.java files existing for cross-language implementation.
 * A Visual C++ or Java component cannot return a VB-style collection to a Visual Basic component.



MORE INFORMATION
If you want to gain access to a server that returns a public Visual Basic collection from Visual C++/Java (which is a very common scenario for in- proc servers), you have to construct your own Header file or Java file.

Alternatively, you can use an externally-defined interface that does not contain an underscore as the first letter in the name. Although you cannot use the components defined in Visual Basic or provided as part of Visual Basic (such as the Collection object), you can still enable all necessary functionality.

Additional query words: kbdss kbDSupport kbVBp kbVBp600 kbVC kbJava kbNoKeyWord

Keywords: kbinfo KB193018

-

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

© Microsoft Corporation. All rights reserved.