title: How do I get a java JNA call to a DLL to get data returned in parameters?
body: <p>I have this java test</p>
  
  <pre><code>package ftct;
  
  import com.sun.jna.Library;
  import com.sun.jna.Native;
  import com.sun.jna.Platform;
  import com.sun.jna.win32.StdCallLibrary;
  import java.util.Date;
  
  public class LibFTCT {
  
  
  public LibFTCT() {
   }
   public interface LibFTCTLib extends StdCallLibrary {
            LibFTCTLib INSTANCE = (LibFTCTLib) Native.loadLibrary(
               "FTCTLib", LibFTCTLib.class);
        int a(int x);
        int DoCommand(int Command, int Param);
      int GetDataRecord(int RecordNum, int StreamNum, Date ReadingTime,
     double AIN1, double AIN2, double AIN3, double AIN4);
  
   }
  }
  </code></pre>
  
  <p>It calls a Delphi DLL. If put the parameters as var in Delphi the Java crashes. Otherwise they are read only.</p>
  
  <p>I want GetDataRecord to return data in RecordNum etc. How do I do this in java?</p>