These classes are located in \Samples\Com\IMarshal\Sample\Client.
Note To use this sample, it is recommended that you have Microsoft® Visual C++® version 5.0 or higher installed.
Description
Key Project Files
Technologies Demonstrated
The sample.client.* classes represent a simple application that shows how Java/COM objects can be easily passed by value. This client has some simple methods that create an instance of the two COM objects served by the Java/COM server.
The first object created is a regular Java object that is marshaled by value to this client. The second object is a Java/COM object that implements a registered Custom interface. The object will be returned to this client by reference, using standard COM marshaling. Methods will be invoked on the second COM object that illustrate how COM parameters can be easily passed through the custom interface both by value and by reference.
Both methods return the sample.server.COMParam COM object (COMParam.java), and in each case the returned object's ping method will be called. The ping method prints a string to standard output. This demonstrates that the returned object resides on the server in the by-reference case, and on the client in the by-value case.
This is the client application that creates the served Java/COM objects.
These classes show how to: