diff --git a/contrib/monitordemo/.classpath b/contrib/monitordemo/.classpath new file mode 100644 index 0000000000..e2935f9482 --- /dev/null +++ b/contrib/monitordemo/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/contrib/monitordemo/.project b/contrib/monitordemo/.project new file mode 100644 index 0000000000..85b55e03af --- /dev/null +++ b/contrib/monitordemo/.project @@ -0,0 +1,17 @@ + + + monitordemo + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/contrib/monitordemo/build.xml b/contrib/monitordemo/build.xml new file mode 100644 index 0000000000..4af4dfd1fd --- /dev/null +++ b/contrib/monitordemo/build.xml @@ -0,0 +1,68 @@ + + + Builds, tests, and runs the project jnacontrib.monitordemo. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/msoffice/.classpath b/contrib/msoffice/.classpath index 34c74501c1..0468c66a68 100644 --- a/contrib/msoffice/.classpath +++ b/contrib/msoffice/.classpath @@ -2,7 +2,7 @@ - - + + diff --git a/contrib/msoffice/build.xml b/contrib/msoffice/build.xml new file mode 100644 index 0000000000..ed163ef04c --- /dev/null +++ b/contrib/msoffice/build.xml @@ -0,0 +1,68 @@ + + + Builds, tests, and runs the project jnacontrib.msoffice. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java b/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java index f03467993f..8221ca6d44 100644 --- a/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java +++ b/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java @@ -14,6 +14,8 @@ import java.io.File; +import com.sun.jna.Pointer; +import com.sun.jna.platform.win32.Ole32; import com.sun.jna.platform.win32.COM.COMException; import com.sun.jna.platform.win32.COM.util.Factory; import com.sun.jna.platform.win32.COM.util.office.word.ComIApplication; @@ -40,6 +42,7 @@ public void testMSWord() { ComWord_Application msWordObject = null; ComIApplication msWord = null; Factory factory = null; + Ole32.INSTANCE.CoInitializeEx(Pointer.NULL, Ole32.COINIT_MULTITHREADED); try { String tempDir = System.getProperty("java.io.tmpdir"); System.out.println("Files in temp dir: "+tempDir); @@ -101,9 +104,7 @@ public void testMSWord() { if (msWord != null) { msWord.Quit(); } - if (null != factory) { - factory.getComThread().terminate(500); - } } + Ole32.INSTANCE.CoUninitialize(); } } diff --git a/contrib/native_window_msg/.classpath b/contrib/native_window_msg/.classpath index a7dee2db96..819c7b01ad 100644 --- a/contrib/native_window_msg/.classpath +++ b/contrib/native_window_msg/.classpath @@ -3,6 +3,6 @@ - + diff --git a/contrib/native_window_msg/build.xml b/contrib/native_window_msg/build.xml new file mode 100644 index 0000000000..5a2098287c --- /dev/null +++ b/contrib/native_window_msg/build.xml @@ -0,0 +1,68 @@ + + + Builds, tests, and runs the project jnacontrib.native_window_msg. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java b/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java index 2e9e962d88..df794ac493 100644 --- a/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java +++ b/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java @@ -13,27 +13,21 @@ package com.sun.jna.platform.win32; -import com.sun.jna.WString; -import com.sun.jna.platform.win32.DBT; import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_DEVICEINTERFACE; import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_HANDLE; import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_HDR; import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_OEM; import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_PORT; import com.sun.jna.platform.win32.DBT.DEV_BROADCAST_VOLUME; -import com.sun.jna.platform.win32.Kernel32; -import com.sun.jna.platform.win32.User32; import com.sun.jna.platform.win32.WinDef.HMODULE; import com.sun.jna.platform.win32.WinDef.HWND; import com.sun.jna.platform.win32.WinDef.LPARAM; import com.sun.jna.platform.win32.WinDef.LRESULT; import com.sun.jna.platform.win32.WinDef.WPARAM; -import com.sun.jna.platform.win32.WinUser; import com.sun.jna.platform.win32.WinUser.HDEVNOTIFY; import com.sun.jna.platform.win32.WinUser.MSG; import com.sun.jna.platform.win32.WinUser.WNDCLASSEX; import com.sun.jna.platform.win32.WinUser.WindowProc; -import com.sun.jna.platform.win32.Wtsapi32; // TODO: Auto-generated Javadoc /** @@ -46,7 +40,7 @@ public class Win32WindowDemo implements WindowProc { */ public Win32WindowDemo() { // define new window class - WString windowClass = new WString("MyWindowClass"); + String windowClass = new String("MyWindowClass"); HMODULE hInst = Kernel32.INSTANCE.GetModuleHandle(""); WNDCLASSEX wClass = new WNDCLASSEX(); diff --git a/contrib/w32printing/.classpath b/contrib/w32printing/.classpath index fb565a588d..d99ea82811 100644 --- a/contrib/w32printing/.classpath +++ b/contrib/w32printing/.classpath @@ -1,6 +1,8 @@ - - - - - - + + + + + + + + diff --git a/contrib/w32printing/build.xml b/contrib/w32printing/build.xml new file mode 100644 index 0000000000..c7acee12d9 --- /dev/null +++ b/contrib/w32printing/build.xml @@ -0,0 +1,58 @@ + + + Builds, tests, and runs the project jnacontrib.w32printing. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +