Java call DLL

xiaoxiao2021-03-06  41

Jawin, a Java calls the third party package, which is temporarily said, I don't know his specific use.

I saw an example of him, very simple

-----------------

Package com.zgc.test.jawin;

Import com.develop.jawin. *;

Public class hellodll {

Public hellodll () {

}

Public static void main (String [] args) {

Try {

Funcptr msgbox = New funcptr ("User32.dll", "MessageBoxw");

Msgbox.invoke (0, "Hello", "JAWIN", 0, RETURNFLAGS.FAIL_ON_FALSE);

}

Catch (Exception E) {

E.PrintStackTrace ();

}

}

}

-----------------

So I jump out of a MSGBox small form.

Simple, interested together.

转载请注明原文地址:https://www.9cbs.com/read-62922.html

New Post(0)