This sample is located in \Samples\Com\VariantSafeArray.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
This sample shows how to pass Variants and SafeArrays of data between a Microsoft® Visual Basic® COM component and a Java application. It covers passing strings, objects, and SafeArrays of various data types to illustrate the issues involved. The example shows how to pass information by value, by reference, and from both Java to Visual Basic and Visual Basic to Java.
To compile the sample
Use Nmake.exe to compile the makefile in the base directory \Samples\Com\VariantSafeArray.
To install the sample
Run Register.bat from the base directory to register the Visual Basic COM component used in this example.
To uninstall the sample
Run Unregister.bat from the base directory to remove the Visual Basic COM component from the registry.
To run the sample
Use the following command to run the Java client:
jview sample.safevar.Client
VBCOMobject
The Visual Basic source code for the COM object used in the sample.
Client.javaThis class is the Java client that uses the VB COM object.