Using JNA call dll

| No TrackBacks

JNA is simpler than JNative.

Using JNative call dll is howto use JNative call dll, but its code is more than JNA. So, I sincerely suggest use JNA.

Fisrt, download the JNA.jar and import to the project library.
Second, write your dll interface class just like below.

package jna;

import com.sun.jna.Native;
import com.sun.jna.win32.StdCallLibrary;

public interface OMSignAPI extends StdCallLibrary {
OMSignAPI INSTANCE = (OMSignAPI)
Native.loadLibrary("C:\\Program Files\\OrderMaster\\OMSignAPI",
OMSignAPI.class);
public boolean IniDllAndPosition(String signID, int iniPosition);
public boolean GoOrder(String signID, String bySignStr,
String dateTimeStr, int nowPosition, double nowPrice);
}

No TrackBacks

TrackBack URL: http://server.everfine.com.tw/blog/mt-tb.cgi/299

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on August 23, 2010 3:49 PM.

How to Check Connection and Control Program in Batch Script was the previous entry in this blog.

Making OpenVPN client connection on startup is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.