📄 hellodll.java
字号:
import org.jawin.COMException;
import org.jawin.FuncPtr;
import org.jawin.ReturnFlags;
/**
* Demo that uses the Win32 MessageBoxW API-method.
*
* @version $Revision: 1.3 $
* @author Stuart Halloway, http://www.relevancellc.com/halloway/weblog/
*/
public class HelloDll {
public static void main(String[] args) throws Exception {
FuncPtr msgBox = null;
try {
msgBox = new FuncPtr("C:\\WINDOWS\\system32\\USER32.DLL", "MessageBoxW");
msgBox.invoke_I(0, "Hello From a DLL", "From Jawin", 0, ReturnFlags.CHECK_FALSE);
} catch (COMException e) {
// handle exception
e.printStackTrace();
throw e;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -