aspose file tools*
The moose likes Java in General and the fly likes How to access out parameters in c++ dll Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to access out parameters in c++ dll" Watch "How to access out parameters in c++ dll" New topic
Author

How to access out parameters in c++ dll

Kedar Saravate
Greenhorn

Joined: Mar 01, 2007
Posts: 5
I am developing C++ DLL for JNI application.
Here while calling methods from java, I am sending local parameter.
They will modified internally by the method written.
But their value is not reflecting outside.(Values get modified at their addresses).
Modified value must reflect for further use.
How can I access that value?
Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
It's not clear to me exactly what you're asking. It's probably not clear to anyone else, which is why there are no replies. You may have more luck if you give some concise code examples.

A Java native method is like any other Java method, when called by Java. The parameters are all passed by value. There are no OUT parameters in Java. The ways for the caller to receive information from the method call are first and foremost the return value, and second the side effects. An exampler of side effects is that the method call can change the data in one or more Java objects.

The C++ implementation of a Java native method can perform Java method calls or can directly change the data in Java objects. Look at the JNI API in detail to see how to do that.


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access out parameters in c++ dll
 
Similar Threads
How to wrap c \ c++ (DLL files) in a servlet or a java application
Problem in servlet to jni inerface
How doI access a C++ Dll from a Java Client
how do i call a Cdll from java
JNI and DLL