diff -Nru libjna-java-4.2.2/AL2.0 libjna-java-4.4.0/AL2.0
--- libjna-java-4.2.2/AL2.0 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/AL2.0 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff -Nru libjna-java-4.2.2/ant-elfanalyser-src/com/sun/jna/BuildArmSoftFloatDetector.java libjna-java-4.4.0/ant-elfanalyser-src/com/sun/jna/BuildArmSoftFloatDetector.java
--- libjna-java-4.2.2/ant-elfanalyser-src/com/sun/jna/BuildArmSoftFloatDetector.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/ant-elfanalyser-src/com/sun/jna/BuildArmSoftFloatDetector.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,53 @@
+
+package com.sun.jna;
+
+import java.io.File;
+import java.io.IOException;
+import org.apache.tools.ant.Project;
+
+/**
+ * Ant task to expose the arm soft-/hardfloat detection routines of the JNA core
+ * for the build script.
+ *
+ *
The build script is expected to build a minimal set of classes that are
+ * required to execute this. At the time of writing these are:
+ *
+ *
+ *
com.sun.jna.ELFAnalyser
+ *
+ */
+public class BuildArmSoftFloatDetector {
+
+ private String targetProperty;
+ private Project project;
+
+ public void setProject(Project proj) {
+ project = proj;
+ }
+
+ /**
+ * targetProperty receives the name of the property, that should take the
+ * new property
+ *
+ * @param targetProperty
+ */
+ public void setTargetProperty(String targetProperty) {
+ this.targetProperty = targetProperty;
+ }
+
+ public void execute() throws IOException {
+ boolean result = false;
+ // On linux /proc/self/exe is a symblink to the currently executing
+ // binary (the JVM)
+ File self = new File("/proc/self/exe");
+ try {
+ // The self.getCanonicalPath() resolves the symblink to the backing
+ // realfile and passes that to the detection routines
+ ELFAnalyser ahfd = ELFAnalyser.analyse(self.getCanonicalPath());
+ result = ahfd.isArmSoftFloat();
+ } catch (IOException ex) {
+ result = false;
+ }
+ project.setNewProperty(targetProperty, Boolean.toString(result));
+ }
+}
diff -Nru libjna-java-4.2.2/ASL2.0 libjna-java-4.4.0/ASL2.0
--- libjna-java-4.2.2/ASL2.0 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/ASL2.0 1970-01-01 00:00:00.000000000 +0000
@@ -1,177 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
diff -Nru libjna-java-4.2.2/build.xml libjna-java-4.4.0/build.xml
--- libjna-java-4.2.2/build.xml 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/build.xml 2017-03-14 19:31:03.000000000 +0000
@@ -31,6 +31,7 @@
+
@@ -48,16 +49,16 @@
-
-
-
+
+
+
-
-
+
+
@@ -67,12 +68,12 @@
-
-
-
+
+
+
-
+
@@ -103,6 +104,7 @@
+
@@ -120,10 +122,10 @@
-
-
-
-
+
+
+
+
@@ -206,6 +208,17 @@
+
+
+
+
+
+
+
+
+
+
+
@@ -228,7 +241,15 @@
+
+
+
+
+
+
+
+
@@ -280,17 +301,19 @@
+
-
+
+ Java version ${java.version}, compatibility: ${compatibility}, ant: ${ant.java.version}
- JNA version ${jna.version}, native ${jni.version}
+ JNA version ${jna.version}, native ${jni.version}, android ${android.versionCode}${java.vm.name} (${java.vm.vendor}, ${java.vm.version})java.home=${java.home}java.library.path=${java.library.path}
@@ -299,6 +322,7 @@
os.arch=${os.arch} (${sun.cpu.endian})build=${build}build.native=${build.native}
+ build.aar=${build.aar}
@@ -307,6 +331,7 @@
+
@@ -418,6 +443,8 @@
processor=x86-64;osname=linux,
com/sun/jna/linux-arm/libjnidispatch.so;
processor=arm;osname=linux,
+com/sun/jna/linux-armel/libjnidispatch.so;
+processor=armel;osname=linux,
com/sun/jna/linux-aarch64/libjnidispatch.so;
processor=aarch64;osname=linux,
com/sun/jna/linux-ia64/libjnidispatch.so;
@@ -462,6 +489,9 @@
+
@@ -516,11 +546,59 @@
+
+
+
+
+
+ JNA bindings
+
+ ]]>
+ int string jna_library_appname 0x7f050021
+
+
+
+
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -543,11 +621,17 @@
-
+
+
+
+
+
+
+
@@ -606,6 +690,7 @@
+
@@ -971,7 +1056,10 @@
-
+
+
+
+
@@ -991,6 +1079,7 @@
+
@@ -1025,7 +1114,7 @@
-
+
@@ -1073,6 +1162,7 @@
-
-
-
+
+
@@ -1133,7 +1223,7 @@
-
+
@@ -1158,6 +1248,7 @@
+
@@ -1166,6 +1257,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
@@ -1201,35 +1317,16 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -1240,32 +1337,10 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff -Nru libjna-java-4.2.2/CHANGES.md libjna-java-4.4.0/CHANGES.md
--- libjna-java-4.2.2/CHANGES.md 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/CHANGES.md 2017-03-14 19:31:03.000000000 +0000
@@ -1,24 +1,132 @@
-NOTE: as of JNA 4.0, JNA is now dual-licensed under LGPL and ASL (see LICENSE).
+NOTE: as of JNA 4.0, JNA is now dual-licensed under LGPL and AL 2.0 (see LICENSE).
NOTE: JNI native support is typically incompatible between minor versions, and almost always incompatible between major versions.
-Release 4.2.2
-============
+Release 4.4.0
+============================
+
+Features
+--------
+* [#757](https://github.com/java-native-access/jna/issues/757): Build android archive (AAR) - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#767](https://github.com/java-native-access/jna/pull/767): Add Win32 API mapping for Shlwapi PathIsUNC - [@ivanwick](https://github.com/ivanwick).
+* [#753](https://github.com/java-native-access/jna/issues/753): Support arm hardfloat and softfloat by introducing armel as platform (ARM EABI Little-endian) - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#772](https://github.com/java-native-access/jna/pull/772): Improved speed of GDIUtil.getScreenshot() by ~30% - [@sommd](https://github.com/sommd).
+
+Bug Fixes
+---------
+* [#754](https://github.com/java-native-access/jna/issues/754): Move MSVC build to standard stdbool.h and require Visual C++ 2015 (sizeof(bool) = 1 is now also true on MSVC build) - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#399](https://github.com/java-native-access/jna/issues/399): Check native version before attempting to call into native code - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#763](https://github.com/java-native-access/jna/issues/763): Fix vararg calls without fixed parts - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#770](https://github.com/java-native-access/jna/pull/770): Fix for free data handle in DdemlUtil. - [@stolarczykt](https://github.com/stolarczykt).
+
+Release 4.3.0
+=============
+
+Features
+--------
+* [#526](https://github.com/java-native-access/jna/pull/526): Added initialization and conversion between Windows SYSTEMTIME and Java Calendar - [@lgoldstein](https://github.com/lgoldstein).
+* [#532](https://github.com/java-native-access/jna/pull/529): Added `com.sun.jna.platform.win32.Mpr`, `com.sun.jna.platform.win32.LmShare`, and `com.sun.jna.platform.win32.Winnetwk` - [@amarcionek](https://github.com/amarcionek).
+* [#532](https://github.com/java-native-access/jna/pull/529): Added `ACCESS_*` definitions to `com.sun.jna.platform.win32.LmAccess` - [@amarcionek](https://github.com/amarcionek).
+* [#532](https://github.com/java-native-access/jna/pull/529): Added `NetShareAdd` and `NetShareDel` to `com.sun.jna.platform.win32.Netapi32` - [@amarcionek](https://github.com/amarcionek).
+* [#535](https://github.com/java-native-access/jna/pull/535): Added `CreateProcessWithLogonW` to `com.sun.jna.platform.win32.Advapi32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#535](https://github.com/java-native-access/jna/pull/535): Added `CertAddEncodedCertificateToSystemStore` to `com.sun.jna.platform.win32.Crypt32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#535](https://github.com/java-native-access/jna/pull/535): Added `BitBlt` to `com.sun.jna.platform.win32.GDI32`, Added `com.sun.jna.platform.win32.GDI32Util` and added `getScreenshot()` to it - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#535](https://github.com/java-native-access/jna/pull/535): Added `SHEmptyRecycleBin`, `ShellExecuteEx` to `com.sun.jna.platform.win32.Shell32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#535](https://github.com/java-native-access/jna/pull/535): Added `GetDesktopWindow` to `com.sun.jna.platform.win32.User32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#540](https://github.com/java-native-access/jna/pull/539): Added Missing Windows kernel32 method: QueryFullProcessImageName - [@yossieilaty](https://github.com/yossieilaty).
+* [#543](https://github.com/java-native-access/jna/pull/543): Added `ProcessIdToSessionId`, `LoadLibraryEx`, `FreeLibrary` and `Find/Load/Lock/SizeofResource` to `com.sun.jna.platform.win32.Kernel32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#545](https://github.com/java-native-access/jna/pull/545): Added `EnumResourceTypes` and `EnumResourceNames` to `com.sun.jna.platform.win32.Kernel32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#547](https://github.com/java-native-access/jna/pull/547): Added `GetSystemTimes` to `com.sun.jna.platform.win32.Kernel32` - [@dbwiddis](https://github.com/dbwiddis).
+* [#548](https://github.com/java-native-access/jna/pull/548): Return 64-bit unsigned integer from `com.sun.jna.platform.win32.WinBase.FILETIME` - [@dbwiddis](https://github.com/dbwiddis).
+* [#524](https://github.com/java-native-access/jna/pull/524): Added IShellFolder interface plus necessary utility functions to Windows platform, and a sample for enumerating objects in My Computer - [@lwahonen](https://github.com/lwahonen).
+* [#471](https://github.com/java-native-access/jna/issues/471): Determine size of native `bool` - [@twall](https://github.com/twall).
+* [#484](https://github.com/java-native-access/jna/pull/484): Added `XFetchName` to `X11` interface - [@pinaf](https://github.com/pinaf).
+* [#554](https://github.com/java-native-access/jna/pull/554): Initial code for a few Unix 'libc' API(s) [@lgoldstein](https://github.com/lgoldstein)
+* [#552](https://github.com/java-native-access/jna/pull/552): Added `Module32FirstW` and `Module32NextW` to `com.sun.jna.platform.win32.Kernel32` (and helper to `com.sun.jna.platform.win32.Kernel32Util`) and `MODULEENTRY32W` structure to `com.sun.jna.platform.win32.Tlhelp32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#564](https://github.com/java-native-access/jna/pull/564): Use generic definition of Native#loadLibrary [@lgoldstein](https://github.com/lgoldstein)
+* [#562](https://github.com/java-native-access/jna/pull/562): Added `com.sun.jna.platform.win32.VersionUtil` with `getFileVersionInfo` utility method to get file major, minor, revision, and build version parts - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#563](https://github.com/java-native-access/jna/pull/563): Added `com.sun.jna.platform.win32.Wininet` with the following 4 methods: `FindFirstUrlCacheEntry`, `DeleteUrlCacheEntry`, `FindCloseUrlCache`, `FindNextUrlCacheEntry`, and the `INTERNET_CACHE_ENTRY_INFO` structure, and a helper in `com.sun.jna.platform.win32.WininetUtil` for parsing WinInet's cache - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#567](https://github.com/java-native-access/jna/pull/567): Added `PrintWindow`, `IsWindowEnabled`, `IsWindow`, `FindWindowEx`, `GetAncestor`, `GetCursorPos`, `SetCursorPos`, `SetWinEventHook`, `UnhookWinEvent`, `CopyIcon`, and `GetClassLong` to `com.sun.jna.platform.win32.User32` and supporting constants to `com.sun.jna.platform.win32.WinUser` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#573](https://github.com/java-native-access/jna/pull/573): Added `EnumProcessModules`, `GetModuleInformation`, and `GetProcessImageFileName` to `com.sun.jna.platform.win32.Psapi` and added `ExtractIconEx` to `com.sun.jna.platform.win32.Shell32` - [@mlfreeman2](https://github.com/mlfreeman2).
+* [#574](https://github.com/java-native-access/jna/pull/574): Using static final un-modifiable List of field names for structure(s) - [@lgoldstein](https://github.com/lgoldstein).
+* [#577](https://github.com/java-native-access/jna/pull/577): Apply generic definitions wherever applicable - [@lgoldstein](https://github.com/lgoldstein).
+* [#569](https://github.com/java-native-access/jna/pull/569): Added `com.sun.jna.platform.win32.Winspool.PRINTER_INFO_2` support. Added GetPrinter and ClosePrinter functions in `com.sun.jna.platform.win32.Winspool` - [@IvanRF](https://github.com/IvanRF).
+* [#583](https://github.com/java-native-access/jna/pull/583): Added printer attributes and status - [@IvanRF](https://github.com/IvanRF).
+* [#589](https://github.com/java-native-access/jna/pull/589): Use `com.sun.jna.MethodResultContext` in direct mapping (as done in interface mapping) - [@marco2357](https://github.com/marco2357).
+* [#595](https://github.com/java-native-access/jna/pull/595): Allow calling COM methods/getters requiring hybrid calling (METHOD+PROPERTYGET) - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#582](https://github.com/java-native-access/jna/pull/582): Mavenize the build process - Phase 1: building the native code via Maven - [@lgoldstein](https://github.com/lgoldstein).
+* [#606](https://github.com/java-native-access/jna/pull/606): Added Kernel32Util method to facilitate checking that calls to LocalFree/GlobalFree are successful - [@lgoldstein](https://github.com/lgoldstein).
+* [#612](https://github.com/java-native-access/jna/pull/612): `Kernel32Util.freeLocalMemory()`/`Kernel32Util.freeGlobalMemory()` always throw `com.sun.jna.platform.win32.Win32Exception` if failed - [@lgoldstein](https://github.com/lgoldstein).
+* [#608](https://github.com/java-native-access/jna/pull/608): Mavenize the build process - change parent and native pom artifactId/name to differentiate in IDE and build tools. - [@bhamail](https://github.com/bhamail)
+* [#613](https://github.com/java-native-access/jna/pull/613): Make `com.sun.jna.platform.win32.Win32Exception` extend `com.sun.jna.LastErrorException` - [@lgoldstein](https://github.com/lgoldstein).
+* [#614](https://github.com/java-native-access/jna/pull/614): Added standard `com.sun.jna.platform.win32.Kernel32Util.closeHandle()` method that throws a `com.sun.jna.platform.win32.Win32Exception` if failed to close the handle - [@lgoldstein](https://github.com/lgoldstein).
+* [#618](https://github.com/java-native-access/jna/pull/618): Implement SAFEARRAY access and bugfix VARIANT - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#616](https://github.com/java-native-access/jna/pull/616): Allow access to base interfaces (most important IDispatch) via ProxyObject and improve binding by allowing to use dispId for the call - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#621](https://github.com/java-native-access/jna/pull/621): Added TYPEFLAGS-constants for `wTypeFlags` in `com.sun.jna.platform.win32.OaIdl.TYPEATTR` - [@SevenOf9Sleeper](https://github.com/SevenOf9Sleeper).
+* [#625](https://github.com/java-native-access/jna/pull/625): Make conversion to/from java to/from VARIANT in `com.sun.jna.platform.win32.COM.util.Convert` more flexible and dependable - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#639](https://github.com/java-native-access/jna/pull/639): Add getloadavg() to OS X and Unix - [@dbwiddis](https://github.com/dbwiddis).
+* [#640](https://github.com/java-native-access/jna/pull/640): Add `com.sun.jna.platform.win32.Psapi.GetPerformanceInfo()`, `com.sun.jna.platform.win32.Kernel32.GetTickCount64()`, and `com.sun.jna.platform.win32.Kernel32.SetErrorMode()` - [@dbwiddis](https://github.com/dbwiddis).
+* [#642](https://github.com/java-native-access/jna/pull/642): COM calls with variable number of arguments (varargs) are now supported - [@SevenOf9Sleeper](https://github.com/SevenOf9Sleeper).
+* [#644](https://github.com/java-native-access/jna/pull/644): New ant target 'install' for installing JNA artifacts in local m2-repository - [@SevenOf9Sleeper](https://github.com/SevenOf9Sleeper).
+* [#649](https://github.com/java-native-access/jna/pull/649): Bugfix msoffice sample and add two samples taken from MSDN and translated from VisualBasic to Java - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#654](https://github.com/java-native-access/jna/pull/654): Support named arguments for `com.sun.jna.platform.win32.COM.util.CallbackProxy` based callbacks - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#659](https://github.com/java-native-access/jna/issues/659): Enable LCID (locale) override for `com.sun.jna.platform.win32.COM.util.ProxyObject`-based COM calls - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#665](https://github.com/java-native-access/jna/pull/665): Added `XSetWMProtocols` and `XGetWMProtocols` to `com.sun.jna.platform.unix.X11` - [@zainab-ali](https://github.com/zainab-ali).
+* [#667](https://github.com/java-native-access/jna/pull/667): Added SetFileSecurity, GetSecurityInfo and SetSecurityInfo to `com.sun.jna.platform.win32.Advapi32` - [@amarcionek](https://github.com/amarcionek).
+* [#667](https://github.com/java-native-access/jna/pull/667): Added NtSetSecurityObject and NtQuerySecurityObject to `com.sun.jna.platform.win32.NtDll` - [@amarcionek](https://github.com/amarcionek).
+* [#680](https://github.com/java-native-access/jna/pull/680): Added `SetCurrentProcessExplicitAppUserModelID` and `GetCurrentProcessExplicitAppUserModelID` to `com.sun.jna.platform.win32.Shell32` for setting the [System.AppUserModel.ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd391569.aspx) of the host process - [@rednoah](https://github.com/rednoah).
+* [#693](https://github.com/java-native-access/jna/pull/693): Bind DDEML (Dynamic Data Exchange Management Library), add a thread implementation that runs a windows message loop - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#702](https://github.com/java-native-access/jna/pull/702): Added `GetClientRect` to `com/sun/jna/platform/win32/User32` - [@Jonatino](https://github.com/Jonatino).
+* [#689](https://github.com/java-native-access/jna/pull/689): Add `GetProcAddress(HMODULE, int)` to `com.sun.jna.platform.win32.Kernel32` - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#723](https://github.com/java-native-access/jna/pull/723): Added `com.sun.jna.platform.win32.Wevtapi` and `com.sun.jna.platform.win32.Winevt` - [@sakamotodesu](https://github.com/sakamotodesu).
+* [#720](https://github.com/java-native-access/jna/issues/720): Added `SetThreadExecutionState` to `com.sun.jna.platform.win32.Kernel32` - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#738](https://github.com/java-native-access/jna/pull/738): Added `GetSecurityDescriptorOwner`, `SetSecurityDescriptorOwner`, `GetSecurityDescriptorGroup`, `SetSecurityDescriptorGroup`, `GetSecurityDescriptorControl`, `SetSecurityDescriptorControl`, `GetSecurityDescriptorDacl`, `SetSecurityDescriptorDacl`, `MakeSelfRelativeSD`, `MakeAbsoluteSD`, `EqualSid`, `InitializeSecurityDescriptor`, `InitializeAcl`, `AddAce`, `AddAccessAllowedAce`, `AddAccessAllowedAceEx`, and `GetAce` to `com.sun.jna.platform.win32.Advapi32 - [@amarcionek](https://github.com/amarcionek).
+* [#738](https://github.com/java-native-access/jna/pull/738): Added `RtlNtStatusToDosError` to `com.sun.jna.platform.win32.NtDll - [@amarcionek](https://github.com/amarcionek).
+* [#732](https://github.com/java-native-access/jna/pull/732): Added `com.sun.jna.platform.win32.WinioctlUtil` for help in determining FSCTL_* codes - [@amarcionek](https://github.com/amarcionek).
+* [#732](https://github.com/java-native-access/jna/pull/732): Added `com.sun.jna.platform.win32.Ntifs` with Reparse Point structures and defines - [@amarcionek](https://github.com/amarcionek).
+* [#732](https://github.com/java-native-access/jna/pull/732): Added initialization of FILETIME from LARGE_INTEGER - [@amarcionek](https://github.com/amarcionek).
+* [#732](https://github.com/java-native-access/jna/pull/732): Added `GetFileInformationByHandleEx` and `SetFileInformationByHandle` to `com.sun.jna.platform.win32.Kernel32` - [@amarcionek](https://github.com/amarcionek).
+* [#740](https://github.com/java-native-access/jna/pull/740): Modified `com.sun.jna.platform.win32.WinioctlUtil` for simplicity dealing with FSCTL_* codes - [@amarcionek](https://github.com/amarcionek).
+* [#745](https://github.com/java-native-access/jna/pull/745): Added Secur32#QueryContextAttributes - [@barney2k7](https://github.com/barney2k7).
Bug Fixes
---------
* [#549](https://github.com/java-native-access/jna/pull/549): Fixed bug in types derived from XID - [@twall](https://github.com/twall).
+* [#536](https://github.com/java-native-access/jna/pull/536): Fixed bug in determining the Library and options associated with types defined outside of a Library - [@twall](https://github.com/twall).
+* [#531](https://github.com/java-native-access/jna/pull/531): Ensure direct-mapped callbacks use the right calling convention - [@twall](https://github.com/twall).
+* [#566](https://github.com/java-native-access/jna/pull/566): Fix return type of Native#loadLibrary to match unconstrained generic [@lgoldstein](https://github.com/lgoldstein).
+* [#584](https://github.com/java-native-access/jna/pull/584): Promote float varargs to double - [@marco2357](https://github.com/marco2357).
+* [#588](https://github.com/java-native-access/jna/pull/588): Fix varargs calls on arm - [@twall](https://github.com/twall).
+* [#593](https://github.com/java-native-access/jna/pull/593): Improve binding of TypeLib bindings - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#578](https://github.com/java-native-access/jna/pull/578): Fix COM CallbackHandlers, allow usage of VARIANTs directly in c.s.j.p.w.COM.util.ProxyObject and fix native memory leak in c.s.j.p.w.COM.util.ProxyObject - [@matthiasblaesing](https://github.com/matthiasblaesing)
+* [#601](https://github.com/java-native-access/jna/pull/601): Remove COMThread and COM initialization from objects and require callers to initialize COM themselves. Asserts are added to guard correct usage. - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#602](https://github.com/java-native-access/jna/pull/602): Make sure SID related memory is properly released once no longer required [@lgoldstein](https://github.com/lgoldstein).
+* [#610](https://github.com/java-native-access/jna/pull/610): Fixed issue #604: Kernel32#GetLastError() always returns ERROR_SUCCESS [@lgoldstein](https://github.com/lgoldstein).
+* [#633](https://github.com/java-native-access/jna/pull/633): Restore default usage of platform native encoding for Java strings passed to native functions (was hard-coded to UTF-8 in 4.0 and later) [@amake](https://github.com/amake)
+* [#634](https://github.com/java-native-access/jna/pull/634): Improve BSTR handling and add `SysStringByteLen` and `SysStringLen` to `com.sun.jna.platform.win32.OleAuto` - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#646](https://github.com/java-native-access/jna/issues/646): `platform.win32.COM.COMBindingBaseObject` swallows reason if instantiation fails - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#674](https://github.com/java-native-access/jna/pull/674): Update references to Apache License as requested by issue #673 [@bhamail](https://github.com/bhamail)
+* [#636](https://github.com/java-native-access/jna/issues/636): Staticly link visual c++ runtime when building with MSVC - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#624](https://github.com/java-native-access/jna/issues/624): WinDef.DWORD getLow() & getHigh() using incorrect bit mask - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#668](https://github.com/java-native-access/jna/issues/668): Correct typemapper used for structures defined in `com.sun.jna.platform.win32.DsGetDC`, `com.sun.jna.platform.win32.LMAccess`, `com.sun.jna.platform.win32.LMShare`, `com.sun.jna.platform.win32.Sspi`, `com.sun.jna.platform.win32.WinBase`, `com.sun.jna.platform.win32.WinCrypt`, `com.sun.jna.platform.win32.WinUser` and `com.sun.jna.platform.win32.Winnetwk` - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#696](https://github.com/java-native-access/jna/issues/696): COMLateBindingObject.getAutomationProperty method that takes iDispatch parameter doesn't use it - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#664](https://github.com/java-native-access/jna/issues/664): Prevent premature GC of Pointer and Function objects by passing whole object into JNI call in addition to the raw pointer value - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#669](https://github.com/java-native-access/jna/pull/669): Ensure XSI-compliant strerror_r is used, to prevent corrupted error messages on linux - [@DavidKeller](https://github.com/DavidKeller).
+* [#697](https://github.com/java-native-access/jna/issues/697): Ensure disposed memory is removed from Memory#allocatedMemory map - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#731](https://github.com/java-native-access/jna/issues/731): Require mingw-w64 instead of mingw as the alternative to the MSVC build - [@matthiasblaesing](https://github.com/matthiasblaesing).
+* [#747](https://github.com/java-native-access/jna/issues/747): - Call `Native.toString()` in `#getFileName()` and `#getAlternateFileName()` in `c.s.j.p.win32.WinBase` instead of custom NUL terminator logic - [@jhult](https://github.com/jhult).
Release 4.2.1
=============
Features
--------
-* [#504](https://github.com/java-native-access/jna/pull/504): Add support for linux-sparcv9 [@alexvsimon](https://github.com/alexvsimon).
+* [#504](https://github.com/java-native-access/jna/pull/504): Add support for linux-sparcv9 - [@alexvsimon](https://github.com/alexvsimon).
* [#510](https://github.com/java-native-access/jna/pull/510): Added `GetCommState`, `GetCommTimeouts` `SetCommState` and `SetCommTimeouts` to `com.sun.jna.platform.win32.Kernel32`. Added `DCB` structure to `com.sun.jna.platform.win32.WinBase` - [@MBollig](https://github.com/MBollig).
* [#512](https://github.com/java-native-access/jna/pull/512): Make loading debug flags mutable [@lwahonen](https://github.com/lwahonen).
* [#514](https://github.com/java-native-access/jna/pull/514): Added `host_processor_info` to `com.sun.jna.platform.mac.SystemB` - [@dbwiddis](https://github.com/dbwiddis).
* [#519](https://github.com/java-native-access/jna/pull/519): Added JNA functional overview - [@twall](https://github.com/twall).
+* [#528](https://github.com/java-native-access/jna/pull/528): Added idea-jar ant task that creates a convenience jar that contains all native dispatch libraries - [@lwahonen](https://github.com/lwahonen).
Bug Fixes
---------
@@ -93,10 +201,10 @@
* Remove unsupported JAWT from OSX build - [@twall](https://github.com/twall).
* Disable WebStart tests - [@twall](https://github.com/twall).
* Dispose all native resources when JNA's native library is unloaded - Paul Grütter, [@twall](https://github.com/twall).
-* Weakly hold registered direct-mapped classes - [@twall](https://github.com/twall).
+* Weakly hold registered direct-mapped classes - [@twall](https://github.com/twall).
* [#382](https://github.com/java-native-access/jna/pull/382): Fixed memory allocation in `com.sun.jna.platform.win32.WTypes.LPWSTR` and `LPSTR` constructors - [@junak-michal](https://github.com/junak-michal).
* Fix publish doc links - [@bhamail](https://github.com/bhamail).
-* [#388](https://github.com/java-native-access/jna/issues/388): Ensure native library always opened with provided flags - [@zolyfarkas](https://github.com/zolyfarkas).
+* [#388](https://github.com/java-native-access/jna/issues/388): Ensure native library always opened with provided flags - [@zolyfarkas](https://github.com/zolyfarkas).
* [#403](https://github.com/java-native-access/jna/pull/403): Fix `com.sun.jna.platform.win32.COM.COMUtils.SUCCEEDED` and `FAILED` - [@lwahonen](https://github.com/lwahonen).
* [#404](https://github.com/java-native-access/jna/pull/404): Fix `VARIANT` constructors for `int`, `short`, and `long` - [@lwahonen](https://github.com/lwahonen).
* [#420](https://github.com/java-native-access/jna/pull/420): Fix structure leaving always one element in ThreadLocal set - [@sjappig](https://github.com/sjappig).
diff -Nru libjna-java-4.2.2/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo2.java libjna-java-4.4.0/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo2.java
--- libjna-java-4.2.2/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo2.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo2.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,12 +1,26 @@
/*
- * Copyright (c) 2007-2008 Timothy Wall, All Rights Reserved This library is
- * free software; you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version. This library is distributed in the
- * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
- * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE. See the GNU Lesser General Public License for more details.
+ * Copyright (c) 2007-2008 Timothy Wall, All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.contrib.demo;
diff -Nru libjna-java-4.2.2/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo.java libjna-java-4.4.0/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo.java
--- libjna-java-4.2.2/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/alphamaskdemo/com/sun/jna/contrib/demo/AlphaMaskDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007-2008 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.contrib.demo;
diff -Nru libjna-java-4.2.2/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManagerDemo.java libjna-java-4.4.0/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManagerDemo.java
--- libjna-java-4.2.2/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManagerDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManagerDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.contrib.demo;
diff -Nru libjna-java-4.2.2/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManager.java libjna-java-4.4.0/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManager.java
--- libjna-java-4.2.2/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManager.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/balloonmanagerdemo/com/sun/jna/contrib/demo/BalloonManager.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,26 @@
/*
* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version. This library is distributed in
- * the hope that it will be useful, but WITHOUT ANY WARRANTY; without
- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for
- * more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.contrib.demo;
diff -Nru libjna-java-4.2.2/contrib/balloontips/com/sun/jna/contrib/demo/BalloonTipManager.java libjna-java-4.4.0/contrib/balloontips/com/sun/jna/contrib/demo/BalloonTipManager.java
--- libjna-java-4.2.2/contrib/balloontips/com/sun/jna/contrib/demo/BalloonTipManager.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/balloontips/com/sun/jna/contrib/demo/BalloonTipManager.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,3 +1,25 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
package com.sun.jna.contrib.demo;
import java.awt.Color;
diff -Nru libjna-java-4.2.2/contrib/balloontips/com/sun/jna/contrib/demo/FilteredTextField.java libjna-java-4.4.0/contrib/balloontips/com/sun/jna/contrib/demo/FilteredTextField.java
--- libjna-java-4.2.2/contrib/balloontips/com/sun/jna/contrib/demo/FilteredTextField.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/balloontips/com/sun/jna/contrib/demo/FilteredTextField.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,3 +1,25 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
package com.sun.jna.contrib.demo;
import java.awt.BorderLayout;
diff -Nru libjna-java-4.2.2/contrib/dnddemo/com/sun/jna/contrib/demo/GhostedDragImageDemo.java libjna-java-4.4.0/contrib/dnddemo/com/sun/jna/contrib/demo/GhostedDragImageDemo.java
--- libjna-java-4.2.2/contrib/dnddemo/com/sun/jna/contrib/demo/GhostedDragImageDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/dnddemo/com/sun/jna/contrib/demo/GhostedDragImageDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.contrib.demo;
diff -Nru libjna-java-4.2.2/contrib/monitordemo/build.xml libjna-java-4.4.0/contrib/monitordemo/build.xml
--- libjna-java-4.2.2/contrib/monitordemo/build.xml 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/monitordemo/build.xml 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,68 @@
+
+
+ Builds, tests, and runs the project jnacontrib.monitordemo.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -Nru libjna-java-4.2.2/contrib/monitordemo/src/com/sun/jna/contrib/demo/MonitorInfoDemo.java libjna-java-4.4.0/contrib/monitordemo/src/com/sun/jna/contrib/demo/MonitorInfoDemo.java
--- libjna-java-4.2.2/contrib/monitordemo/src/com/sun/jna/contrib/demo/MonitorInfoDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/monitordemo/src/com/sun/jna/contrib/demo/MonitorInfoDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,17 +1,26 @@
/*
* Copyright 2014 Martin Steiger
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.contrib.demo;
diff -Nru libjna-java-4.2.2/contrib/msoffice/build.xml libjna-java-4.4.0/contrib/msoffice/build.xml
--- libjna-java-4.2.2/contrib/msoffice/build.xml 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/build.xml 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,68 @@
+
+
+ Builds, tests, and runs the project jnacontrib.msoffice.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Binary files /tmp/tmptdXlQx/zXsTgf0UHo/libjna-java-4.2.2/contrib/msoffice/jnatest.doc and /tmp/tmptdXlQx/nhswvPAIcW/libjna-java-4.4.0/contrib/msoffice/jnatest.doc differ
Binary files /tmp/tmptdXlQx/zXsTgf0UHo/libjna-java-4.2.2/contrib/msoffice/jnatest.xls and /tmp/tmptdXlQx/nhswvPAIcW/libjna-java-4.4.0/contrib/msoffice/jnatest.xls differ
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/COMInfoUtil.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/COMInfoUtil.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/COMInfoUtil.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/COMInfoUtil.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,18 +1,41 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
package com.sun.jna.platform.win32.COM;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
-import com.sun.jna.platform.win32.COM.COMUtils;
import com.sun.jna.platform.win32.COM.COMUtils.COMInfo;
+import java.io.File;
public class COMInfoUtil {
public static void main(String[] args) {
FileWriter writer = null;
try {
- String filename = "C:\\TEMP\\CLSIDs.txt";
+ String filename = new File(Helper.tempDir, "CLSIDs.txt").getAbsolutePath();
ArrayList comInfos = COMUtils.getAllCOMInfoOnSystem();
writer = new FileWriter(filename);
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/Helper.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/Helper.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/Helper.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/Helper.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,97 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.file.Files;
+
+public class Helper {
+ public static final File tempDir = new File(System.getProperty("java.io.tmpdir"));
+
+ /**
+ * Sleep for specified seconds.
+ *
+ * @param seconds
+ */
+ public static void sleep(int seconds) {
+ try {
+ Thread.sleep(seconds * 1000L);
+ } catch (InterruptedException ex) {
+ // Ignore
+ }
+ }
+
+ /**
+ * Extract data contained in classpath into a system accessible target file.
+ *
+ * @param localPath
+ * @param target
+ * @throws IOException
+ */
+ public static void extractClasspathFileToReal(String localPath, File target) throws IOException {
+ InputStream is = null;
+ OutputStream os = null;
+ try {
+ is = Helper.class.getResourceAsStream(localPath);
+ os = new FileOutputStream(target);
+
+ int read;
+ byte[] buffer = new byte[20480];
+
+ while((read = is.read(buffer)) > 0) {
+ os.write(buffer, 0, read);
+ }
+
+ } finally {
+ if(is != null) {
+ try {
+ is.close();
+ } catch(Exception ex) {}
+ }
+ if(os != null) {
+ try {
+ os.close();
+ } catch(Exception ex) {}
+ }
+ }
+ }
+
+ /**
+ * Create a temporary file, that does not exist.
+ *
+ * @param prefix
+ * @param suffix
+ * @return
+ * @throws IOException
+ */
+ public static File createNotExistingFile(String prefix, String suffix) throws IOException {
+ File tempFile = Files.createTempFile(prefix, suffix).toFile();
+ tempFile.delete();
+ return tempFile;
+ }
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSExcel.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSExcel.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSExcel.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSExcel.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,3 +1,26 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
package com.sun.jna.platform.win32.COM.office;
import com.sun.jna.platform.win32.Variant.VARIANT;
@@ -28,9 +51,7 @@
this.invokeNoReply("Add", getWorkbooks());
}
- public void openExcelBook(String filename, boolean bVisible)
- throws COMException {
- // OpenDocument
+ public void openExcelBook(String filename) throws COMException {
this.invokeNoReply("Open", getWorkbooks(), new VARIANT(filename));
}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSOfficeDemo.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSOfficeDemo.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSOfficeDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSOfficeDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,28 +1,51 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
package com.sun.jna.platform.win32.COM.office;
-import java.io.File;
+import com.sun.jna.Pointer;
import com.sun.jna.platform.win32.COM.COMException;
+import com.sun.jna.platform.win32.COM.Helper;
+import com.sun.jna.platform.win32.Ole32;
import com.sun.jna.platform.win32.WinDef.LONG;
+import java.io.File;
+import java.io.IOException;
public class MSOfficeDemo {
-
- /**
- * @param args
- */
- public static void main(String[] args) {
- new MSOfficeDemo();
- }
-
- private String currentWorkingDir = new File("").getAbsolutePath()
- + File.separator;
-
- public MSOfficeDemo() {
- //this.testMSWord();
- this.testMSExcel();
+ public static void main(String[] args) throws IOException {
+ Ole32.INSTANCE.CoInitializeEx(Pointer.NULL, Ole32.COINIT_MULTITHREADED);
+ try {
+ MSOfficeDemo demo = new MSOfficeDemo();
+ demo.testMSExcel();
+ demo.testMSWord();
+ } finally {
+ Ole32.INSTANCE.CoUninitialize();
+ }
}
- public void testMSWord() {
+ public void testMSWord() throws IOException {
+ File demoDocument = null;
MSWord msWord = null;
// http://msdn.microsoft.com/en-us/library/office/ff839952(v=office.15).aspx
@@ -42,82 +65,92 @@
System.out.println("MSWord version: " + msWord.getVersion());
msWord.setVisible(true);
- // msWord.newDocument();
- msWord.openDocument(currentWorkingDir + "jnatest.doc", true);
+
+ Helper.sleep(5);
+
+ demoDocument = Helper.createNotExistingFile("jnatest", ".doc");
+ Helper.extractClasspathFileToReal("/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.doc", demoDocument);
+
+ msWord.openDocument(demoDocument.getAbsolutePath());
msWord.insertText("Hello from JNA! \n\n");
// wait 10sec. before closing
- Thread.currentThread().sleep(1000);
+ Helper.sleep(10);
// save in different formats
// pdf format is only supported in MSWord 2007 and above
- msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.doc", wdFormatDocument);
- msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.pdf", wdFormatPDF);
- msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.rtf", wdFormatRTF);
- msWord.SaveAs("C:\\TEMP\\jnatestSaveAs.html", wdFormatHTML);
+ System.out.println("Wrinting files to: " + Helper.tempDir);
+ msWord.SaveAs(new File(Helper.tempDir, "jnatestSaveAs.doc").getAbsolutePath(), wdFormatDocument);
+ msWord.SaveAs(new File(Helper.tempDir, "jnatestSaveAs.pdf").getAbsolutePath(), wdFormatPDF);
+ msWord.SaveAs(new File(Helper.tempDir, "jnatestSaveAs.rtf").getAbsolutePath(), wdFormatRTF);
+ msWord.SaveAs(new File(Helper.tempDir, "jnatestSaveAs.html").getAbsolutePath(), wdFormatHTML);
// close and save the document
msWord.closeActiveDocument(false);
msWord.newDocument();
// msWord.openDocument(currentWorkingDir + "jnatest.doc", true);
msWord.insertText("Hello from JNA! \n Please notice that JNA can control MS Word via the new COM interface! \nHere we are creating a new word document and we save it to the 'TEMP' directory!");
// save with no user prompt
- msWord.SaveAs("C:\\TEMP\\jnatestNewDoc1.docx", wdFormatDocumentDefault);
- msWord.SaveAs("C:\\TEMP\\jnatestNewDoc2.docx", wdFormatDocumentDefault);
- msWord.SaveAs("C:\\TEMP\\jnatestNewDoc3.docx", wdFormatDocumentDefault);
+ msWord.SaveAs(new File(Helper.tempDir, "jnatestNewDoc1.docx").getAbsolutePath(), wdFormatDocumentDefault);
+ msWord.SaveAs(new File(Helper.tempDir, "jnatestNewDoc2.docx").getAbsolutePath(), wdFormatDocumentDefault);
+ msWord.SaveAs(new File(Helper.tempDir, "jnatestNewDoc3.docx").getAbsolutePath(), wdFormatDocumentDefault);
// close and save the document
msWord.closeActiveDocument(false);
// open 3 documents
- msWord.openDocument("C:\\TEMP\\jnatestNewDoc1.docx", true);
+ msWord.openDocument(new File(Helper.tempDir, "jnatestNewDoc1.docx").getAbsolutePath());
msWord.insertText("Hello some changes from JNA!\n");
- msWord.openDocument("C:\\TEMP\\jnatestNewDoc2.docx", true);
+ msWord.openDocument(new File(Helper.tempDir, "jnatestNewDoc2.docx").getAbsolutePath());
msWord.insertText("Hello some changes from JNA!\n");
- msWord.openDocument("C:\\TEMP\\jnatestNewDoc3.docx", true);
+ msWord.openDocument(new File(Helper.tempDir, "jnatestNewDoc3.docx").getAbsolutePath());
msWord.insertText("Hello some changes from JNA!\n");
// save the document and prompt the user
msWord.Save(false, wdPromptUser);
- // wait then close word
- msWord.quit();
- } catch(InterruptedException ie) {
- ie.printStackTrace();
} catch (COMException e) {
if (e.getExcepInfo() != null) {
- System.out
- .println("bstrSource: " + e.getExcepInfo().bstrSource);
- System.out.println("bstrDescription: "
- + e.getExcepInfo().bstrDescription);
+ System.out.println("bstrSource: " + e.getExcepInfo().bstrSource);
+ System.out.println("bstrDescription: " + e.getExcepInfo().bstrDescription);
}
-
- // print stack trace
- e.printStackTrace();
-
- if (msWord != null)
+ } finally {
+ if (msWord != null) {
msWord.quit();
+ }
+
+ if(demoDocument != null && demoDocument.exists()) {
+ demoDocument.delete();
+ }
}
}
- public void testMSExcel() {
+ public void testMSExcel() throws IOException {
+ File demoDocument = null;
MSExcel msExcel = null;
try {
msExcel = new MSExcel();
System.out.println("MSExcel version: " + msExcel.getVersion());
msExcel.setVisible(true);
- // msExcel.newExcelBook();
- msExcel.openExcelBook(currentWorkingDir + "jnatest.xls", true);
+
+ Helper.sleep(5);
+
+ demoDocument = Helper.createNotExistingFile("jnatest", ".xls");
+ Helper.extractClasspathFileToReal("/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.xls", demoDocument);
+
+ msExcel.openExcelBook(demoDocument.getAbsolutePath());
msExcel.insertValue("A1", "Hello from JNA!");
// wait 10sec. before closing
- Thread.currentThread().sleep(10000);
+ Helper.sleep(10);
// close and save the active sheet
msExcel.closeActiveWorkbook(true);
- msExcel.setVisible(true);
- // msExcel.newExcelBook();
- msExcel.openExcelBook(currentWorkingDir + "jnatest.xls", true);
+
+ msExcel.newExcelBook();
msExcel.insertValue("A1", "Hello from JNA!");
// close and save the active sheet
msExcel.closeActiveWorkbook(true);
- } catch (Exception e) {
- e.printStackTrace();
-
- if (msExcel != null)
+ } finally {
+ if (msExcel != null) {
msExcel.quit();
+ }
+
+ if (demoDocument != null && demoDocument.exists()) {
+ demoDocument.delete();
+ }
}
}
}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSWord.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSWord.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSWord.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/office/MSWord.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,3 +1,26 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
package com.sun.jna.platform.win32.COM.office;
import com.sun.jna.platform.win32.Variant.VARIANT;
@@ -29,9 +52,7 @@
this.invokeNoReply("Add", getDocuments());
}
- public void openDocument(String filename, boolean bVisible)
- throws COMException {
- // OpenDocument
+ public void openDocument(String filename) throws COMException {
this.invokeNoReply("Open", getDocuments(), new VARIANT(filename));
}
@@ -70,7 +91,6 @@
}
public Documents getDocuments() {
- // GetDocuments
Documents pDocuments = new Documents(this.getAutomationProperty(
"Documents", this.getApplication().getIDispatch()));
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Borders.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Borders.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Borders.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Borders.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,42 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface
+public interface Borders {
+ @ComProperty
+ XlBorderWeight getWeight();
+
+ @ComProperty
+ void setWeight(XlBorderWeight weight);
+
+ @ComProperty
+ XlLineStyle getLineStyle();
+
+ @ComProperty
+ void setLineStyle(XlLineStyle weight);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Chart.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Chart.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Chart.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Chart.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,42 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.IDispatch;
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+
+@ComInterface
+public interface Chart {
+ @ComMethod
+ void ChartWizard(Object Source,Object Gallery,Object Format,Object PlotBy,
+ Object CategoryLabels,Object SeriesLabels,Object HasLegend,
+ Object Title,Object CategoryTitle,Object ValueTitle,Object ExtraTitle);
+
+ @ComMethod
+ Series SeriesCollection(Object index);
+
+ @ComMethod
+ IDispatch Location(XlChartLocation location, String name);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Charts.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Charts.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Charts.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Charts.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,41 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface
+public interface Charts {
+
+ @ComMethod
+ Chart Add(Object before, Object after, Object count, Object type);
+
+ @ComProperty
+ int getCount();
+
+ @ComProperty
+ int getItem(Object item);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComExcel_Application.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComExcel_Application.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComExcel_Application.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComExcel_Application.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,10 +1,33 @@
-package com.sun.jna.platform.win32.COM.util.office.excel;
-
-import com.sun.jna.platform.win32.COM.util.IUnknown;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-import com.sun.jna.platform.win32.COM.util.annotation.ComObject;
-
-@ComObject(progId="Excel.Application")
-public interface ComExcel_Application extends IUnknown {
-
-}
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.IUnknown;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComObject;
+
+@ComObject(progId="Excel.Application")
+public interface ComExcel_Application extends IUnknown {
+
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIAppEvents.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIAppEvents.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIAppEvents.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIAppEvents.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,12 +1,35 @@
-package com.sun.jna.platform.win32.COM.util.office.excel;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComEventCallback;
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-
-@ComInterface(iid="{00024413-0000-0000-C000-000000000046}")
-public interface ComIAppEvents {
-
- @ComEventCallback(dispid=1558)
- public void SheetSelectionChange(ComIWorksheet sheet, ComIRange target);
-
-}
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComEventCallback;
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+
+@ComInterface(iid="{00024413-0000-0000-C000-000000000046}")
+public interface ComIAppEvents {
+
+ @ComEventCallback(dispid=1558)
+ public void SheetSelectionChange(ComIWorksheet sheet, ComIRange target);
+
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIApplication.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIApplication.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIApplication.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIApplication.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,32 +1,61 @@
-package com.sun.jna.platform.win32.COM.util.office.excel;
-
-import com.sun.jna.platform.win32.COM.util.IConnectionPoint;
-import com.sun.jna.platform.win32.COM.util.IUnknown;
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
-
-@ComInterface(iid="{000208D5-0000-0000-C000-000000000046}")
-public interface ComIApplication extends IUnknown, IConnectionPoint {
-
- @ComProperty
- String getVersion();
-
- @ComProperty
- boolean getVisible();
-
- @ComProperty
- void setVisible(boolean value);
-
- @ComProperty
- ComIWorkbooks getWorkbooks();
-
- @ComProperty
- ComIWorksheet getActiveSheet();
-
- @ComProperty
- ComIWorkbook getActiveWorkbook();
-
- @ComMethod
- void Quit();
-}
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.IConnectionPoint;
+import com.sun.jna.platform.win32.COM.util.IUnknown;
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface(iid="{000208D5-0000-0000-C000-000000000046}")
+public interface ComIApplication extends IUnknown, IConnectionPoint {
+
+ @ComProperty
+ String getVersion();
+
+ @ComProperty
+ boolean getVisible();
+
+ @ComProperty
+ void setVisible(boolean value);
+
+ @ComProperty
+ ComIWorkbooks getWorkbooks();
+
+ @ComProperty
+ ComIWorksheet getActiveSheet();
+
+ @ComProperty
+ ComIWorkbook getActiveWorkbook();
+
+ @ComMethod
+ void Quit();
+
+ @ComProperty
+ boolean getUserControl();
+
+ @ComProperty
+ void setUserControl(boolean value);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIRange.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIRange.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIRange.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIRange.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,25 +1,116 @@
-package com.sun.jna.platform.win32.COM.util.office.excel;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
-
-@ComInterface(iid = "{00020846-0000-0000-C000-000000000046}")
-public interface ComIRange {
-
- @ComProperty
- ComIApplication getApplication();
-
- @ComProperty
- String getText();
-
- @ComMethod
- void Select();
-
- @ComProperty
- void setValue(String value);
-
- @ComMethod
- void Activate();
-
-}
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface(iid = "{00020846-0000-0000-C000-000000000046}")
+public interface ComIRange {
+
+ @ComProperty
+ ComIApplication getApplication();
+
+ @ComProperty
+ String getText();
+
+ @ComMethod
+ void Select();
+
+ @ComProperty
+ void setValue(String value);
+
+ @ComMethod
+ void Activate();
+
+ @ComProperty
+ ComIRange getItem(Object rowIndex, Object columnIndex);
+
+ @ComProperty
+ void setValue(Object data);
+
+ @ComProperty
+ Object getValue();
+
+ @ComProperty
+ void setFormula(String data);
+
+ @ComProperty
+ String getFormula();
+
+ @ComProperty
+ void setNumberFormat(String data);
+
+ @ComProperty
+ String getNumberFormat();
+
+ @ComProperty
+ ComIRange getEntireColumn();
+
+ @ComMethod
+ void AutoFit();
+
+ @ComProperty
+ public ComIRange getResize(Object rowSize, Object columnSize);
+
+ @ComProperty
+ void setOrientation(int degree);
+
+ @ComProperty
+ int getOrientation();
+
+ @ComProperty
+ void setWrapText(boolean wrap);
+
+ @ComProperty
+ boolean getWrapText();
+
+ @ComProperty
+ Interior getInterior();
+
+ @ComProperty
+ Borders getBorders();
+
+ @ComProperty
+ int getTop();
+
+ @ComProperty
+ void setTop(int value);
+
+ @ComProperty
+ int getLeft();
+
+ @ComProperty
+ void setLeft(int value);
+
+ @ComProperty
+ String getName();
+
+ @ComProperty
+ void setName(String name);
+
+ @ComProperty
+ void setAddress(String name);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbook.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbook.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbook.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbook.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,13 +1,47 @@
-package com.sun.jna.platform.win32.COM.util.office.excel;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-
-@ComInterface(iid="{0002096B-0000-0000-C000-000000000046}")
-public interface ComIWorkbook {
-
- @ComMethod
- void Close(boolean saveChanges);
-
-
-}
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface(iid="{0002096B-0000-0000-C000-000000000046}")
+public interface ComIWorkbook {
+
+ @ComMethod
+ void Close(boolean saveChanges);
+
+ @ComProperty
+ ComIWorksheet getActiveSheet();
+
+ @ComMethod
+ void Save();
+
+ @ComMethod
+ void SaveAs(String filename);
+
+ @ComProperty
+ Charts getCharts();
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbooks.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbooks.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbooks.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorkbooks.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,19 +1,44 @@
-package com.sun.jna.platform.win32.COM.util.office.excel;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
-
-@ComInterface(iid = "{000208DB-0000-0000-C000-000000000046}")
-public interface ComIWorkbooks {
-
- @ComProperty
- long getCount();
-
- @ComMethod
- ComIWorkbook Item(long index);
-
- @ComMethod
- ComIWorkbook Open(Object FileName);
-
-}
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface(iid = "{000208DB-0000-0000-C000-000000000046}")
+public interface ComIWorkbooks {
+
+ @ComProperty
+ long getCount();
+
+ @ComMethod
+ ComIWorkbook Item(long index);
+
+ @ComMethod
+ ComIWorkbook Open(Object FileName);
+
+ @ComMethod
+ ComIWorkbook Add();
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorksheet.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorksheet.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorksheet.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/ComIWorksheet.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,19 +1,57 @@
-package com.sun.jna.platform.win32.COM.util.office.excel;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
-
-@ComInterface(iid="{000208D8-0000-0000-C000-000000000046}")
-public interface ComIWorksheet {
-
- @ComProperty
- String getName();
-
- @ComProperty
- ComIRange getRange(String cell1);
-
- @ComProperty
- ComIApplication getApplication();
-
-}
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface(iid="{000208D8-0000-0000-C000-000000000046}")
+public interface ComIWorksheet {
+ @ComProperty
+ ComIWorkbook getParent();
+
+ @ComProperty
+ String getName();
+
+ @ComProperty
+ ComIRange getRange(String cell1);
+
+ @ComProperty
+ ComIRange getRange(String cell1, String cell2);
+
+ @ComProperty
+ ComIApplication getApplication();
+
+ @ComProperty
+ ComIRange getCells();
+
+ @ComProperty
+ Shapes getShapes();
+
+ @ComProperty
+ ComIRange getRows(Object identifier);
+
+ @ComProperty
+ ComIRange getColumns(Object identifier);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Interior.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Interior.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Interior.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Interior.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,36 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface
+public interface Interior {
+ @ComProperty
+ int getColorIndex();
+
+ @ComProperty
+ void setColorIndex(int value);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Series.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Series.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Series.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Series.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,39 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface
+public interface Series {
+ @ComProperty
+ void setXValues(Object values);
+
+ @ComProperty
+ String getName();
+
+ @ComProperty
+ void setName(String name);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shape.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shape.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shape.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shape.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,44 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface
+public interface Shape {
+
+ @ComProperty
+ int getTop();
+
+ @ComProperty
+ void setTop(int value);
+
+ @ComProperty
+ int getLeft();
+
+ @ComProperty
+ void setLeft(int value);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shapes.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shapes.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shapes.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/Shapes.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,33 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+
+@ComInterface
+public interface Shapes {
+ @ComMethod
+ Shape Item(Object index);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlBorderWeight.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlBorderWeight.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlBorderWeight.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlBorderWeight.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,44 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.office.word.*;
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum XlBorderWeight implements IComEnum {
+
+ xlHairline(1),
+ xlMedium(-4138),
+ xlThick(4),
+ xlThin(2);
+
+ private XlBorderWeight(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartLocation.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartLocation.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartLocation.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartLocation.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,43 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.office.word.*;
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum XlChartLocation implements IComEnum {
+
+ xlLocationAsNewSheet(1),
+ xlLocationAsObject(2),
+ xlLocationAutomatic(3);
+
+ private XlChartLocation(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartType.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartType.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartType.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlChartType.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,113 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.office.word.*;
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum XlChartType implements IComEnum {
+
+ xlColumnClustered(51),
+ xlColumnStacked(52),
+ xlColumnStacked100(53),
+ xl3DColumnClustered(54),
+ xl3DColumnStacked(55),
+ xl3DColumnStacked100(56),
+ xlBarClustered(57),
+ xlBarStacked(58),
+ xlBarStacked100(59),
+ xl3DBarClustered(60),
+ xl3DBarStacked(61),
+ xl3DBarStacked100(62),
+ xlLineStacked(63),
+ xlLineStacked100(64),
+ xlLineMarkers(65),
+ xlLineMarkersStacked(66),
+ xlLineMarkersStacked100(67),
+ xlPieOfPie(68),
+ xlPieExploded(69),
+ xl3DPieExploded(70),
+ xlBarOfPie(71),
+ xlXYScatterSmooth(72),
+ xlXYScatterSmoothNoMarkers(73),
+ xlXYScatterLines(74),
+ xlXYScatterLinesNoMarkers(75),
+ xlAreaStacked(76),
+ xlAreaStacked100(77),
+ xl3DAreaStacked(78),
+ xl3DAreaStacked100(79),
+ xlDoughnutExploded(80),
+ xlRadarMarkers(81),
+ xlRadarFilled(82),
+ xlSurface(83),
+ xlSurfaceWireframe(84),
+ xlSurfaceTopView(85),
+ xlSurfaceTopViewWireframe(86),
+ xlBubble(15),
+ xlBubble3DEffect(87),
+ xlStockHLC(88),
+ xlStockOHLC(89),
+ xlStockVHLC(90),
+ xlStockVOHLC(91),
+ xlCylinderColClustered(92),
+ xlCylinderColStacked(93),
+ xlCylinderColStacked100(94),
+ xlCylinderBarClustered(95),
+ xlCylinderBarStacked(96),
+ xlCylinderBarStacked100(97),
+ xlCylinderCol(98),
+ xlConeColClustered(99),
+ xlConeColStacked(100),
+ xlConeColStacked100(101),
+ xlConeBarClustered(102),
+ xlConeBarStacked(103),
+ xlConeBarStacked100(104),
+ xlConeCol(105),
+ xlPyramidColClustered(106),
+ xlPyramidColStacked(107),
+ xlPyramidColStacked100(108),
+ xlPyramidBarClustered(109),
+ xlPyramidBarStacked(110),
+ xlPyramidBarStacked100(111),
+ xlPyramidCol(112),
+ xl3DColumn(-4100),
+ xlLine(4),
+ xl3DLine(-4101),
+ xl3DPie(-4102),
+ xlPie(5),
+ xlXYScatter(-4169),
+ xl3DArea(-4098),
+ xlArea(1),
+ xlDoughnut(-4120),
+ xlRadar(-4151);
+
+ private XlChartType(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlLineStyle.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlLineStyle.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlLineStyle.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlLineStyle.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,48 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.office.word.*;
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum XlLineStyle implements IComEnum {
+
+ xlContinuous(1),
+ xlDash(-4115),
+ xlDashDot(4),
+ xlDashDotDot(5),
+ xlDot(-4118),
+ xlDouble(-4119),
+ xlSlantDashDot(13),
+ xlLineStyleNone(-4142);
+
+ private XlLineStyle(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlRowCol.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlRowCol.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlRowCol.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/excel/XlRowCol.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,42 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.excel;
+
+import com.sun.jna.platform.win32.COM.util.office.word.*;
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum XlRowCol implements IComEnum {
+
+ xlColumns(2),
+ xlRows(1);
+
+ private XlRowCol(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Excelautomation_KB_219151_Mod.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Excelautomation_KB_219151_Mod.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Excelautomation_KB_219151_Mod.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Excelautomation_KB_219151_Mod.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,224 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.COM.Helper;
+import com.sun.jna.platform.win32.COM.util.Factory;
+import com.sun.jna.platform.win32.COM.util.office.excel.Borders;
+import com.sun.jna.platform.win32.COM.util.office.excel.Chart;
+import com.sun.jna.platform.win32.COM.util.office.excel.ComExcel_Application;
+import com.sun.jna.platform.win32.COM.util.office.excel.ComIApplication;
+import com.sun.jna.platform.win32.COM.util.office.excel.ComIRange;
+import com.sun.jna.platform.win32.COM.util.office.excel.ComIWorkbook;
+import com.sun.jna.platform.win32.COM.util.office.excel.ComIWorksheet;
+import com.sun.jna.platform.win32.COM.util.office.excel.Shape;
+import com.sun.jna.platform.win32.COM.util.office.excel.XlBorderWeight;
+import com.sun.jna.platform.win32.COM.util.office.excel.XlChartLocation;
+import com.sun.jna.platform.win32.COM.util.office.excel.XlLineStyle;
+import com.sun.jna.platform.win32.COM.util.office.excel.XlRowCol;
+import com.sun.jna.platform.win32.COM.util.office.office.XlChartType;
+import com.sun.jna.platform.win32.OaIdl;
+import com.sun.jna.platform.win32.OaIdl.SAFEARRAY;
+import com.sun.jna.platform.win32.Ole32;
+import com.sun.jna.platform.win32.Variant;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+import static com.sun.jna.platform.win32.Variant.VARIANT.VARIANT_MISSING;
+import com.sun.jna.platform.win32.WTypes.BSTR;
+import com.sun.jna.platform.win32.WinDef.LCID;
+import java.io.File;
+
+import java.io.IOException;
+import javax.swing.JDialog;
+
+import javax.swing.JOptionPane;
+
+/**
+ * Based on VB sample: https://support.microsoft.com/en-us/kb/219151
+ *
+ *
Please note: The contained type-bindings are far from complete and only
+ * included as sample - please use one of the generators to generate complete
+ * bindings or enhance the coverage yourself.
+ */
+public class Excelautomation_KB_219151_Mod {
+
+ public static void main(String[] args) throws IOException {
+ // Initialize COM Subsystem
+ Ole32.INSTANCE.CoInitializeEx(Pointer.NULL, Ole32.COINIT_MULTITHREADED);
+ // Initialize Factory for COM object creation
+ Factory fact = new Factory();
+ // Set LCID for calls to english locale. Without this formulas need
+ // to be specified in the users locale.
+ fact.setLCID(new LCID(0x0409));
+
+ try {
+ // Start excel application
+ ComExcel_Application excel = fact.createObject(ComExcel_Application.class);
+ ComIApplication excelApp = excel.queryInterface(ComIApplication.class);
+
+ // Set visiblite of application
+ excelApp.setVisible(true);
+
+ Helper.sleep(5);
+
+ // Get a new workbook.
+ ComIWorkbook wb = excelApp.getWorkbooks().Add();
+ ComIWorksheet sheet = wb.getActiveSheet();
+
+ // Add table headers going cell by cell.
+ sheet.getCells().getItem(1, 1).setValue("First Name");
+ sheet.getCells().getItem(1, 2).setValue("Last Name");
+ sheet.getCells().getItem(1, 3).setValue("Full Name");
+ sheet.getCells().getItem(1, 4).setValue("Salary");
+
+ // Create an array to set multiple values at once.
+ SAFEARRAY saNames = safeVariantArrayFromJava(new String[][] {
+ {"John", "Smith"},
+ {"Tom", "Brown"},
+ {"Sue", "Thomas"},
+ {"Jane", "Jones"},
+ {"Adam", "Johnson"},
+ });
+
+ // Fill A2:B6 with an array of values (First and Last Names).
+ VARIANT valueHolder = new VARIANT();
+ valueHolder.setValue(Variant.VT_ARRAY | Variant.VT_VARIANT, saNames);
+ sheet.getRange("A2", "B6").setValue(valueHolder);
+ saNames.destroy();
+
+ // Fill C2:C6 with a relative formula (=A2 & " " & B2).
+ sheet.getRange("C2", "C6").setFormula("= A2 & \" \" & B2");
+
+ // Fill D2:D6 with a formula(=RAND()*100000) and apply format.
+ sheet.getRange("D2", "D6").setFormula("=RAND()*100000");
+ sheet.getRange("D2", "D6").setNumberFormat("$0.00");
+
+ // AutoFit columns A:D.
+ sheet.getRange("A1", "D2").getEntireColumn().AutoFit();
+
+ displayQuaterlySales(sheet);
+
+ File tempFile = Helper.createNotExistingFile("exceloutput", ".xlsx");
+ System.out.println("Writing output to: " + tempFile.getAbsolutePath());
+ wb.SaveAs(tempFile.getAbsolutePath());
+
+ excelApp.setUserControl(true);
+ } finally {
+ fact.disposeAll();
+ Ole32.INSTANCE.CoUninitialize();
+ }
+
+ System.exit(0);
+ }
+
+ private static void displayQuaterlySales(ComIWorksheet sheet) {
+ // Determine how many quarters to display data for.
+ int iNumQtrs = 4;
+ for(; iNumQtrs >= 2; iNumQtrs--) {
+ JOptionPane pane = new JOptionPane(
+ String.format("Enter sales data for %d quarter(s)?", iNumQtrs),
+ JOptionPane.QUESTION_MESSAGE);
+ pane.setOptionType(JOptionPane.YES_NO_OPTION);
+ JDialog dialog = pane.createDialog("Input...");
+ dialog.setAlwaysOnTop(true);
+ dialog.show();
+ if(((Integer) pane.getValue()) == JOptionPane.YES_OPTION) {
+ break;
+ }
+ }
+
+ JOptionPane.showMessageDialog(
+ null,
+ String.format("Displaying data for %d quarter(s).", iNumQtrs)
+ );
+
+ // Starting at E1, fill headers for the number of columns selected.
+ ComIRange oResizeRange = sheet.getRange("E1", "E1").getResize(VARIANT_MISSING, iNumQtrs);
+
+ oResizeRange.setFormula("=\"Q\" & COLUMN() - 4 & CHAR(10) & \"Sales\"");
+
+ // Change the Orientation and WrapText properties for the headers.
+ oResizeRange.setOrientation(38);
+ oResizeRange.setWrapText(true);
+
+ // Fill the interior color of the headers.
+ oResizeRange.getInterior().setColorIndex(36);
+
+ // Fill the columns with a formula and apply a number format.
+ oResizeRange = sheet.getRange("E2", "E6").getResize(VARIANT_MISSING, iNumQtrs);
+ oResizeRange.setFormula("=RAND()*100");
+ oResizeRange.setNumberFormat("$0.00");
+
+ // Apply borders to the Sales data and headers.
+ oResizeRange = sheet.getRange("E1", "E6").getResize(VARIANT_MISSING, iNumQtrs);
+ oResizeRange.getBorders().setWeight(XlBorderWeight.xlThin);
+
+ // Add a Totals formula for the sales data and apply a border.
+ oResizeRange = sheet.getRange("E8", "E8").getResize(VARIANT_MISSING, iNumQtrs);
+ oResizeRange.setFormula("=SUM(E2:E6)");
+ Borders oResizeRangeBorders = oResizeRange.getBorders();
+ oResizeRangeBorders.setLineStyle(XlLineStyle.xlDouble);
+ oResizeRangeBorders.setWeight(XlBorderWeight.xlThick);
+
+ // Add a Chart for the selected data
+ oResizeRange = sheet.getRange("E2:E6").getResize(VARIANT_MISSING, iNumQtrs);
+
+ Chart chart = sheet.getParent().getCharts().Add(VARIANT_MISSING,VARIANT_MISSING,VARIANT_MISSING,VARIANT_MISSING);
+ // Java note: Assumption is, that VARIANT_MISSING is the correct indicator
+ // for missing values, it turns out, NULL is correct in this case...
+ chart.ChartWizard(oResizeRange, XlChartType.xl3DColumn, VARIANT_MISSING,
+ XlRowCol.xlColumns,
+ null, null, null,
+ null,null,null,
+ null
+ );
+ chart.SeriesCollection(1).setXValues(sheet.getRange("C2", "C6"));
+ for(int i = 1; i <= iNumQtrs; i++) {
+ chart.SeriesCollection(i).setName("=\"Q" + Integer.toString(i) + "\"");
+ }
+ chart.Location(XlChartLocation.xlLocationAsObject, sheet.getName());
+
+ // Move the chart so as not to cover your data.
+ Shape shape = sheet.getShapes().Item(1);
+ shape.setTop(sheet.getRows(10).getTop());
+ shape.setLeft(sheet.getColumns(2).getLeft());
+ }
+
+ private static SAFEARRAY safeVariantArrayFromJava(String[][] data) {
+ // The data array is defined/stored row major, while excel expects the
+ // data column major, so this method also transposes the matrix
+
+ OaIdl.SAFEARRAY wrapped = OaIdl.SAFEARRAY.createSafeArray(data[0].length, data.length);
+ // VARIANT is java allocated and will be freed by GC
+ VARIANT var = new VARIANT();
+ for(int i = 0; i < data.length; i++) {
+ for(int j = 0; j < data[0].length; j++) {
+ // BSTR is allocated by java and will be freed by GC
+ var.setValue(Variant.VT_BSTR, new BSTR(data[i][j]));
+ wrapped.putElement(var, j, i);
+ }
+ }
+ return wrapped;
+ }
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeExcelDemo.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeExcelDemo.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeExcelDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeExcelDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,68 +1,91 @@
/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.win32.COM.util.office;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.COM.Helper;
import java.io.File;
-import com.sun.jna.platform.win32.COM.office.MSExcel;
import com.sun.jna.platform.win32.COM.util.AbstractComEventCallbackListener;
import com.sun.jna.platform.win32.COM.util.Factory;
+import com.sun.jna.platform.win32.COM.util.IComEventCallbackCookie;
import com.sun.jna.platform.win32.COM.util.office.excel.ComExcel_Application;
import com.sun.jna.platform.win32.COM.util.office.excel.ComIAppEvents;
import com.sun.jna.platform.win32.COM.util.office.excel.ComIApplication;
import com.sun.jna.platform.win32.COM.util.office.excel.ComIRange;
+import com.sun.jna.platform.win32.COM.util.office.excel.ComIWorkbook;
import com.sun.jna.platform.win32.COM.util.office.excel.ComIWorksheet;
-import com.sun.jna.platform.win32.COM.util.office.word.ComWord_Application;
+import com.sun.jna.platform.win32.Ole32;
+import java.io.IOException;
public class MSOfficeExcelDemo {
+ private static final String currentWorkingDir = new File("").getAbsolutePath() + File.separator;
- /**
- * @param args
- */
- public static void main(String[] args) {
- new MSOfficeExcelDemo();
- }
-
- private String currentWorkingDir = new File("").getAbsolutePath() + File.separator;
-
- public MSOfficeExcelDemo() {
- this.testMSExcel();
- }
-
- public void testMSExcel() {
- ComExcel_Application excelObject = null;
- ComIApplication msExcel = null;
- Factory factory = null;
+ public static void main(String[] argv) throws IOException {
+ Ole32.INSTANCE.CoInitializeEx(Pointer.NULL, Ole32.COINIT_MULTITHREADED);
+ try {
+ testExcel();
+ } finally {
+ Ole32.INSTANCE.CoUninitialize();
+ }
+ }
+
+ public static void testExcel() throws IOException {
+ File demoDocument = null;
+ ComIApplication msExcel = null;
+ Factory factory = new Factory();
try {
- factory = new Factory();
- excelObject = factory.createObject(ComExcel_Application.class);
+ System.out.println("Files in temp dir: " + Helper.tempDir.getAbsolutePath());
+
+ ComExcel_Application excelObject = factory.createObject(ComExcel_Application.class);
msExcel = excelObject.queryInterface(ComIApplication.class);
+
System.out.println("MSExcel version: " + msExcel.getVersion());
+
msExcel.setVisible(true);
- // msExcel.newExcelBook();
- msExcel.getWorkbooks().Open(currentWorkingDir + "jnatest.xls");
+
+ Helper.sleep(5);
+
+ demoDocument = Helper.createNotExistingFile("jnatest", ".xls");
+ Helper.extractClasspathFileToReal("/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.xls", demoDocument);
+
+ ComIWorkbook workbook = msExcel.getWorkbooks().Open(demoDocument.getAbsolutePath());
msExcel.getActiveSheet().getRange("A1").setValue("Hello from JNA!");
// wait 1sec. before closing
- Thread.currentThread().sleep(1000);
-// // close and save the active sheet
-// msExcel.getActiveWorkbook().Close(true);
-// msExcel.setVisible(true);
+ Helper.sleep(1);
+ // Save document into temp and close
+ File output = new File(Helper.tempDir, "jnatest.xls");
+ output.delete();
+ workbook.SaveAs(output.getAbsolutePath());
+ msExcel.getActiveWorkbook().Close(false);
+
// // msExcel.newExcelBook();
-// msExcel.getWorkbooks().Open(currentWorkingDir + "jnatest.xls");
-// msExcel.getActiveSheet().getRange("A2").setValue("Hello again from JNA!");
+ msExcel.getWorkbooks().Open(output.getAbsolutePath());
+ msExcel.getActiveSheet().getRange("A2").setValue("Hello again from JNA!");
class Listener extends AbstractComEventCallbackListener implements ComIAppEvents {
- boolean SheetSelectionChange_called;
+ volatile boolean SheetSelectionChange_called;
@Override
public void errorReceivingCallbackEvent(String message, Exception exception) {
@@ -75,26 +98,32 @@
};
Listener listener = new Listener();
- msExcel.advise(ComIAppEvents.class, listener);
-//
-// msExcel.getActiveSheet().getRange("A5").Activate();
-//
-// Thread.currentThread().sleep(500);
+ IComEventCallbackCookie cookie = msExcel.advise(ComIAppEvents.class, listener);
- // close and save the active sheet
- msExcel.getActiveWorkbook().Close(true);
+ Helper.sleep(1);
+
+ msExcel.getActiveSheet().getRange("A5").Activate();
- msExcel.Quit();
- msExcel = null;
- } catch (Exception e) {
- e.printStackTrace();
+ Helper.sleep(1);
+
+ msExcel.unadvise(ComIAppEvents.class, cookie);
+
+ System.out.println("Listener was fired: " + listener.SheetSelectionChange_called);
+
+ // close and discard changes
+ msExcel.getActiveWorkbook().Close(false);
} finally {
+ // Make sure the excel instance is shut down
if (null != msExcel) {
msExcel.Quit();
}
- if (null != factory) {
- factory.disposeAll();
- }
+
+ // Release all objects acquired by the factory
+ factory.disposeAll();
+
+ if (demoDocument != null && demoDocument.exists()) {
+ demoDocument.delete();
+ }
}
}
}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/MSOfficeWordDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,109 +1,122 @@
/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.win32.COM.util.office;
import java.io.File;
-import com.sun.jna.platform.win32.COM.COMException;
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.Ole32;
+import com.sun.jna.platform.win32.COM.Helper;
import com.sun.jna.platform.win32.COM.util.Factory;
import com.sun.jna.platform.win32.COM.util.office.word.ComIApplication;
import com.sun.jna.platform.win32.COM.util.office.word.ComWord_Application;
import com.sun.jna.platform.win32.COM.util.office.word.WdOriginalFormat;
import com.sun.jna.platform.win32.COM.util.office.word.WdSaveFormat;
+import java.io.IOException;
public class MSOfficeWordDemo {
+ private static final String currentWorkingDir = new File("").getAbsolutePath() + File.separator;
- /**
- * @param args
- */
- public static void main(String[] args) {
- new MSOfficeWordDemo();
+ public static void main(String[] args) throws IOException {
+ Ole32.INSTANCE.CoInitializeEx(Pointer.NULL, Ole32.COINIT_MULTITHREADED);
+ try {
+ testMSWord();
+ } finally {
+ Ole32.INSTANCE.CoUninitialize();
+ }
}
- private String currentWorkingDir = new File("").getAbsolutePath() + File.separator;
-
- public MSOfficeWordDemo() {
- this.testMSWord();
- }
-
- public void testMSWord() {
- ComWord_Application msWordObject = null;
+ public static void testMSWord() throws IOException {
+ File demoDocument = null;
ComIApplication msWord = null;
- Factory factory = null;
+ Factory factory = new Factory();
+
try {
- String tempDir = System.getProperty("java.io.tmpdir");
- System.out.println("Files in temp dir: "+tempDir);
-
- factory = new Factory();
- msWordObject = factory.createObject(ComWord_Application.class);
+ System.out.println("Files in temp dir: " + Helper.tempDir.getAbsolutePath());
+
+ ComWord_Application msWordObject = factory.createObject(ComWord_Application.class);
msWord = msWordObject.queryInterface(ComIApplication.class);
System.out.println("MSWord version: " + msWord.getVersion());
msWord.setVisible(true);
- // msWord.newDocument();
- msWord.getDocuments().Open(currentWorkingDir + "jnatest.doc");
+
+ demoDocument = Helper.createNotExistingFile("jnatest", ".doc");
+ Helper.extractClasspathFileToReal("/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.doc", demoDocument);
+
+ msWord.getDocuments().Open(demoDocument.getAbsolutePath());
+
+ Helper.sleep(5);
+
msWord.getSelection().TypeText("Hello from JNA! \n\n");
// wait 10sec. before closing
- Thread.sleep(1000);
+ Helper.sleep(10);
// save in different formats
// pdf format is only supported in MSWord 2007 and above
- msWord.getActiveDocument().SaveAs(tempDir+"\\jnatestSaveAs.doc", WdSaveFormat.wdFormatDocument);
- msWord.getActiveDocument().SaveAs(tempDir+"\\jnatestSaveAs.pdf", WdSaveFormat.wdFormatPDF);
- msWord.getActiveDocument().SaveAs(tempDir+"\\jnatestSaveAs.rtf", WdSaveFormat.wdFormatRTF);
- msWord.getActiveDocument().SaveAs(tempDir+"\\jnatestSaveAs.html", WdSaveFormat.wdFormatHTML);
- // close and save the document
+ msWord.getActiveDocument().SaveAs(new File(Helper.tempDir, "jnatestSaveAs.doc").getAbsolutePath(), WdSaveFormat.wdFormatDocument);
+ msWord.getActiveDocument().SaveAs(new File(Helper.tempDir, "jnatestSaveAs.pdf").getAbsolutePath(), WdSaveFormat.wdFormatPDF);
+ msWord.getActiveDocument().SaveAs(new File(Helper.tempDir, "jnatestSaveAs.rtf").getAbsolutePath(), WdSaveFormat.wdFormatRTF);
+ msWord.getActiveDocument().SaveAs(new File(Helper.tempDir, "jnatestSaveAs.html").getAbsolutePath(), WdSaveFormat.wdFormatHTML);
+ // close and don't save the changes
msWord.getActiveDocument().Close(false);
+
+ // Create a new document
msWord.getDocuments().Add();
// msWord.openDocument(currentWorkingDir + "jnatest.doc", true);
- msWord.getSelection()
- .TypeText(
- "Hello from JNA! \n Please notice that JNA can control MS Word via the new COM interface! \nHere we are creating a new word document and we save it to the 'TEMP' directory!");
- // save with no user prompt
- msWord.getActiveDocument().SaveAs(tempDir+"\\jnatestNewDoc1.docx", WdSaveFormat.wdFormatDocumentDefault);
- msWord.getActiveDocument().SaveAs(tempDir+"\\jnatestNewDoc2.docx", WdSaveFormat.wdFormatDocumentDefault);
- msWord.getActiveDocument().SaveAs(tempDir+"\\jnatestNewDoc3.docx", WdSaveFormat.wdFormatDocumentDefault);
- // close and save the document
+ msWord.getSelection().TypeText(
+ "Hello from JNA! \n Please notice that JNA can control "
+ + "MS Word via the new COM interface! \nHere we are "
+ + "creating a new word document and we save it "
+ + "to the 'TEMP' directory!");
+ // save with no user prompt
+ msWord.getActiveDocument().SaveAs(new File(Helper.tempDir, "jnatestNewDoc1.docx").getAbsolutePath(), WdSaveFormat.wdFormatDocumentDefault);
+ msWord.getActiveDocument().SaveAs(new File(Helper.tempDir, "jnatestNewDoc2.docx").getAbsolutePath(), WdSaveFormat.wdFormatDocumentDefault);
+ msWord.getActiveDocument().SaveAs(new File(Helper.tempDir, "jnatestNewDoc3.docx").getAbsolutePath(), WdSaveFormat.wdFormatDocumentDefault);
+ // close and don't save the changes
msWord.getActiveDocument().Close(false);
+
// open 3 documents
- msWord.getDocuments().Open(tempDir+"\\jnatestNewDoc1.docx");
+ msWord.getDocuments().Open(new File(Helper.tempDir, "jnatestNewDoc1.docx").getAbsolutePath());
msWord.getSelection().TypeText("Hello some changes from JNA!\n");
- msWord.getDocuments().Open(tempDir+"\\jnatestNewDoc2.docx");
+ msWord.getDocuments().Open(new File(Helper.tempDir, "jnatestNewDoc2.docx").getAbsolutePath());
msWord.getSelection().TypeText("Hello some changes from JNA!\n");
- msWord.getDocuments().Open(tempDir+"\\jnatestNewDoc3.docx");
+ msWord.getDocuments().Open(new File(Helper.tempDir, "jnatestNewDoc3.docx").getAbsolutePath());
msWord.getSelection().TypeText("Hello some changes from JNA!\n");
// save the document and prompt the user
msWord.getDocuments().Save(false, WdOriginalFormat.wdPromptUser);
- // wait then close word
- msWord.Quit();
- msWord = null;
- } catch (InterruptedException ie) {
- ie.printStackTrace();
- } catch (COMException e) {
- if (e.getExcepInfo() != null) {
- System.out.println("bstrSource: " + e.getExcepInfo().bstrSource);
- System.out.println("bstrDescription: " + e.getExcepInfo().bstrDescription);
- }
-
- // print stack trace
- e.printStackTrace();
} finally {
+ // Make sure the word instance is shut down
if (msWord != null) {
msWord.Quit();
}
- if (null != factory) {
- factory.getComThread().terminate(500);
- }
+
+ // Release all objects acquired by the factory
+ factory.disposeAll();
+
+ if (demoDocument != null && demoDocument.exists()) {
+ demoDocument.delete();
+ }
}
}
}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/office/XlChartType.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/office/XlChartType.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/office/XlChartType.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/office/XlChartType.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,434 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.office;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum XlChartType implements IComEnum {
+
+ /**
+ * (51)
+ */
+ xlColumnClustered(51),
+
+ /**
+ * (52)
+ */
+ xlColumnStacked(52),
+
+ /**
+ * (53)
+ */
+ xlColumnStacked100(53),
+
+ /**
+ * (54)
+ */
+ xl3DColumnClustered(54),
+
+ /**
+ * (55)
+ */
+ xl3DColumnStacked(55),
+
+ /**
+ * (56)
+ */
+ xl3DColumnStacked100(56),
+
+ /**
+ * (57)
+ */
+ xlBarClustered(57),
+
+ /**
+ * (58)
+ */
+ xlBarStacked(58),
+
+ /**
+ * (59)
+ */
+ xlBarStacked100(59),
+
+ /**
+ * (60)
+ */
+ xl3DBarClustered(60),
+
+ /**
+ * (61)
+ */
+ xl3DBarStacked(61),
+
+ /**
+ * (62)
+ */
+ xl3DBarStacked100(62),
+
+ /**
+ * (63)
+ */
+ xlLineStacked(63),
+
+ /**
+ * (64)
+ */
+ xlLineStacked100(64),
+
+ /**
+ * (65)
+ */
+ xlLineMarkers(65),
+
+ /**
+ * (66)
+ */
+ xlLineMarkersStacked(66),
+
+ /**
+ * (67)
+ */
+ xlLineMarkersStacked100(67),
+
+ /**
+ * (68)
+ */
+ xlPieOfPie(68),
+
+ /**
+ * (69)
+ */
+ xlPieExploded(69),
+
+ /**
+ * (70)
+ */
+ xl3DPieExploded(70),
+
+ /**
+ * (71)
+ */
+ xlBarOfPie(71),
+
+ /**
+ * (72)
+ */
+ xlXYScatterSmooth(72),
+
+ /**
+ * (73)
+ */
+ xlXYScatterSmoothNoMarkers(73),
+
+ /**
+ * (74)
+ */
+ xlXYScatterLines(74),
+
+ /**
+ * (75)
+ */
+ xlXYScatterLinesNoMarkers(75),
+
+ /**
+ * (76)
+ */
+ xlAreaStacked(76),
+
+ /**
+ * (77)
+ */
+ xlAreaStacked100(77),
+
+ /**
+ * (78)
+ */
+ xl3DAreaStacked(78),
+
+ /**
+ * (79)
+ */
+ xl3DAreaStacked100(79),
+
+ /**
+ * (80)
+ */
+ xlDoughnutExploded(80),
+
+ /**
+ * (81)
+ */
+ xlRadarMarkers(81),
+
+ /**
+ * (82)
+ */
+ xlRadarFilled(82),
+
+ /**
+ * (83)
+ */
+ xlSurface(83),
+
+ /**
+ * (84)
+ */
+ xlSurfaceWireframe(84),
+
+ /**
+ * (85)
+ */
+ xlSurfaceTopView(85),
+
+ /**
+ * (86)
+ */
+ xlSurfaceTopViewWireframe(86),
+
+ /**
+ * (15)
+ */
+ xlBubble(15),
+
+ /**
+ * (87)
+ */
+ xlBubble3DEffect(87),
+
+ /**
+ * (88)
+ */
+ xlStockHLC(88),
+
+ /**
+ * (89)
+ */
+ xlStockOHLC(89),
+
+ /**
+ * (90)
+ */
+ xlStockVHLC(90),
+
+ /**
+ * (91)
+ */
+ xlStockVOHLC(91),
+
+ /**
+ * (92)
+ */
+ xlCylinderColClustered(92),
+
+ /**
+ * (93)
+ */
+ xlCylinderColStacked(93),
+
+ /**
+ * (94)
+ */
+ xlCylinderColStacked100(94),
+
+ /**
+ * (95)
+ */
+ xlCylinderBarClustered(95),
+
+ /**
+ * (96)
+ */
+ xlCylinderBarStacked(96),
+
+ /**
+ * (97)
+ */
+ xlCylinderBarStacked100(97),
+
+ /**
+ * (98)
+ */
+ xlCylinderCol(98),
+
+ /**
+ * (99)
+ */
+ xlConeColClustered(99),
+
+ /**
+ * (100)
+ */
+ xlConeColStacked(100),
+
+ /**
+ * (101)
+ */
+ xlConeColStacked100(101),
+
+ /**
+ * (102)
+ */
+ xlConeBarClustered(102),
+
+ /**
+ * (103)
+ */
+ xlConeBarStacked(103),
+
+ /**
+ * (104)
+ */
+ xlConeBarStacked100(104),
+
+ /**
+ * (105)
+ */
+ xlConeCol(105),
+
+ /**
+ * (106)
+ */
+ xlPyramidColClustered(106),
+
+ /**
+ * (107)
+ */
+ xlPyramidColStacked(107),
+
+ /**
+ * (108)
+ */
+ xlPyramidColStacked100(108),
+
+ /**
+ * (109)
+ */
+ xlPyramidBarClustered(109),
+
+ /**
+ * (110)
+ */
+ xlPyramidBarStacked(110),
+
+ /**
+ * (111)
+ */
+ xlPyramidBarStacked100(111),
+
+ /**
+ * (112)
+ */
+ xlPyramidCol(112),
+
+ /**
+ * (-4100)
+ */
+ xl3DColumn(-4100),
+
+ /**
+ * (4)
+ */
+ xlLine(4),
+
+ /**
+ * (-4101)
+ */
+ xl3DLine(-4101),
+
+ /**
+ * (-4102)
+ */
+ xl3DPie(-4102),
+
+ /**
+ * (5)
+ */
+ xlPie(5),
+
+ /**
+ * (-4169)
+ */
+ xlXYScatter(-4169),
+
+ /**
+ * (-4098)
+ */
+ xl3DArea(-4098),
+
+ /**
+ * (1)
+ */
+ xlArea(1),
+
+ /**
+ * (-4120)
+ */
+ xlDoughnut(-4120),
+
+ /**
+ * (-4151)
+ */
+ xlRadar(-4151),
+
+ /**
+ * (-4152)
+ */
+ xlCombo(-4152),
+
+ /**
+ * (113)
+ */
+ xlComboColumnClusteredLine(113),
+
+ /**
+ * (114)
+ */
+ xlComboColumnClusteredLineSecondaryAxis(114),
+
+ /**
+ * (115)
+ */
+ xlComboAreaStackedColumnClustered(115),
+
+ /**
+ * (116)
+ */
+ xlOtherCombinations(116),
+
+ /**
+ * (-2)
+ */
+ xlSuggestedChart(-2),
+ ;
+
+ private XlChartType(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
Binary files /tmp/tmptdXlQx/zXsTgf0UHo/libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.doc and /tmp/tmptdXlQx/nhswvPAIcW/libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.doc differ
Binary files /tmp/tmptdXlQx/zXsTgf0UHo/libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.xls and /tmp/tmptdXlQx/nhswvPAIcW/libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/resources/jnatest.xls differ
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmark.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmark.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmark.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmark.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,116 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComMethod(name = "Copy", dispId = 0xc)
+ Bookmark Copy(String Name);
+
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmarks.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmarks.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmarks.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Bookmarks.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,50 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComMethod(name = "Item", dispId = 0x0)
+ Bookmark Item(Object Index);
+
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Cell.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Cell.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Cell.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Cell.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,42 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComProperty(name = "Range", dispId = 0x0)
+ Range getRange();
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Column.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Column.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Column.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Column.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,48 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComProperty(name = "Width", dispId = 0x3)
+ void setWidth(Float param0);
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Columns.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Columns.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Columns.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Columns.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,59 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComMethod(name = "Delete", dispId = 0xc8)
+ void Delete();
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIApplication.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIApplication.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIApplication.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIApplication.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,43 +1,60 @@
-/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform.win32.COM.util.office.word;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
-
-@ComInterface(iid="{00020970-0000-0000-C000-000000000046}")
-public interface ComIApplication {
-
- @ComProperty
- String getVersion();
-
- @ComProperty
- boolean getVisible();
-
- @ComProperty
- void setVisible(boolean value);
-
- @ComProperty
- ComIDocuments getDocuments();
-
- @ComProperty
- ComISelection getSelection();
-
- @ComProperty
- ComIDocument getActiveDocument();
-
- @ComMethod
- void Quit();
-
-}
+/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+@ComInterface(iid="{00020970-0000-0000-C000-000000000046}")
+public interface ComIApplication {
+
+ @ComProperty
+ String getVersion();
+
+ @ComProperty
+ boolean getVisible();
+
+ @ComProperty
+ void setVisible(boolean value);
+
+ @ComProperty
+ ComIDocuments getDocuments();
+
+ @ComProperty
+ ComISelection getSelection();
+
+ @ComProperty
+ ComIDocument getActiveDocument();
+
+ @ComMethod
+ void Quit();
+
+ /**
+ *
+ * id(0x172)
+ */
+ @ComMethod(name = "InchesToPoints", dispId = 0x172)
+ Float InchesToPoints(Float Inches);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocument.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocument.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocument.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocument.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,25 +1,84 @@
-/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform.win32.COM.util.office.word;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-
-public interface ComIDocument {
-
- @ComMethod
- void SaveAs(String string, WdSaveFormat wdFormatDocument);
-
- @ComMethod
- void Close(boolean saveChanges);
-
-}
+/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+public interface ComIDocument {
+
+ @ComMethod
+ void SaveAs(String string, WdSaveFormat wdFormatDocument);
+
+ @ComMethod
+ void Close(boolean saveChanges);
+
+ /**
+ *
+ */
+ @ComMethod(name = "ExportAsFixedFormat", dispId = 0x228)
+ void ExportAsFixedFormat(String OutputFileName,
+ WdExportFormat ExportFormat,
+ Boolean OpenAfterExport,
+ WdExportOptimizeFor OptimizeFor,
+ WdExportRange Range,
+ Integer From,
+ Integer To,
+ WdExportItem Item,
+ Boolean IncludeDocProps,
+ Boolean KeepIRM,
+ WdExportCreateBookmarks CreateBookmarks,
+ Boolean DocStructureTags,
+ Boolean BitmapMissingFonts,
+ Boolean UseISO19005_1,
+ Object FixedFormatExtClassPtr);
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocuments.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocuments.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocuments.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComIDocuments.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,28 +1,39 @@
-/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform.win32.COM.util.office.word;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-
-public interface ComIDocuments {
-
- @ComMethod
- ComIDocument Open(String fileName);
-
- @ComMethod
- ComIDocument Add();
-
- @ComMethod
- void Save(boolean noPrompt, WdOriginalFormat originalFormat);
-
-}
+/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+
+public interface ComIDocuments {
+
+ @ComMethod
+ ComIDocument Open(String fileName);
+
+ @ComMethod
+ ComIDocument Add();
+
+ @ComMethod
+ void Save(boolean noPrompt, WdOriginalFormat originalFormat);
+
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComISelection.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComISelection.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComISelection.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComISelection.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,24 +1,35 @@
-/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform.win32.COM.util.office.word;
-
-import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
-import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
-
-@ComInterface
-public interface ComISelection {
-
- @ComMethod
- void TypeText(String text);
-
-}
+/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+
+@ComInterface
+public interface ComISelection {
+
+ @ComMethod
+ void TypeText(String text);
+
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComWord_Application.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComWord_Application.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComWord_Application.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ComWord_Application.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,21 +1,32 @@
-/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform.win32.COM.util.office.word;
-
-import com.sun.jna.platform.win32.COM.util.IUnknown;
-import com.sun.jna.platform.win32.COM.util.annotation.ComObject;
-
-@ComObject(progId="Word.Application")
-public interface ComWord_Application extends IUnknown {
-
-}
+/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IUnknown;
+import com.sun.jna.platform.win32.COM.util.annotation.ComObject;
+
+@ComObject(progId="Word.Application")
+public interface ComWord_Application extends IUnknown {
+
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_Font.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_Font.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_Font.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_Font.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,61 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComProperty(name = "Italic", dispId = 0x83)
+ void setItalic(Integer param0);
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Font.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Font.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Font.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Font.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,44 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.COMException;
+import com.sun.jna.platform.win32.COM.util.IComEventCallbackCookie;
+import com.sun.jna.platform.win32.COM.util.IComEventCallbackListener;
+import com.sun.jna.platform.win32.COM.util.IConnectionPoint;
+import com.sun.jna.platform.win32.COM.util.IUnknown;
+import com.sun.jna.platform.win32.COM.util.annotation.ComObject;
+
+/**
+ *
uuid({000209F5-0000-0000-C000-000000000046})
+ *
interface(_Font)
+ *
interface(IUnknown)
+ */
+@ComObject(clsId = "{000209F5-0000-0000-C000-000000000046}")
+public interface Font extends
+ _Font,
+ IUnknown
+{
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShape.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShape.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShape.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShape.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,69 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+/**
+ *
+ */
+ @ComProperty(name = "Width", dispId = 0x9)
+ void setWidth(Float param0);
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShapes.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShapes.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShapes.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/InlineShapes.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,47 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+
+/**
+ *
+ */
+ @ComMethod(name = "AddOLEObject", dispId = 0x18)
+ InlineShape AddOLEObject(Object ClassType,
+ Object FileName,
+ Object LinkToFile,
+ Object DisplayAsIcon,
+ Object IconFileName,
+ Object IconIndex,
+ Object IconLabel,
+ Object Range);
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/OLEFormat.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/OLEFormat.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/OLEFormat.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/OLEFormat.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,192 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComProperty(name = "PreserveFormattingOnUpdate", dispId = 0x70)
+ void setPreserveFormattingOnUpdate(Boolean param0);
+
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_ParagraphFormat.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_ParagraphFormat.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_ParagraphFormat.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/_ParagraphFormat.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,39 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+/**
+ *
+ */
+ @ComProperty(name = "SpaceAfter", dispId = 0x70)
+ void setSpaceAfter(Float param0);
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ParagraphFormat.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ParagraphFormat.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ParagraphFormat.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/ParagraphFormat.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,44 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.COMException;
+import com.sun.jna.platform.win32.COM.util.IComEventCallbackCookie;
+import com.sun.jna.platform.win32.COM.util.IComEventCallbackListener;
+import com.sun.jna.platform.win32.COM.util.IConnectionPoint;
+import com.sun.jna.platform.win32.COM.util.IUnknown;
+import com.sun.jna.platform.win32.COM.util.annotation.ComObject;
+
+/**
+ *
uuid({000209F4-0000-0000-C000-000000000046})
+ *
interface(_ParagraphFormat)
+ *
interface(IUnknown)
+ */
+@ComObject(clsId = "{000209F4-0000-0000-C000-000000000046}")
+public interface ParagraphFormat extends
+ _ParagraphFormat,
+ IUnknown
+{
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraph.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraph.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraph.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraph.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,54 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComProperty(name = "Format", dispId = 0x44e)
+ void setFormat(ParagraphFormat param0);
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraphs.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraphs.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraphs.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Paragraphs.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,55 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComMethod(name = "Add", dispId = 0x5)
+ Paragraph Add(Object Range);
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Range.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Range.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Range.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Range.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,157 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+/**
+ *
+ */
+ @ComProperty(name = "InlineShapes", dispId = 0x13f)
+ InlineShapes getInlineShapes();
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Row.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Row.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Row.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Row.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,40 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+
+/**
+ *
+ */
+ @ComProperty(name = "Range", dispId = 0x0)
+ Range getRange();
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Rows.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Rows.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Rows.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Rows.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,52 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+
+/**
+ *
+ */
+ @ComMethod(name = "Delete", dispId = 0xc8)
+ void Delete();
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Table.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Table.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Table.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Table.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,62 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComMethod(name = "Cell", dispId = 0x11)
+ Cell Cell(Integer Row,
+ Integer Column);
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Tables.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Tables.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Tables.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/Tables.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,59 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.annotation.ComInterface;
+import com.sun.jna.platform.win32.COM.util.annotation.ComMethod;
+import com.sun.jna.platform.win32.COM.util.annotation.ComProperty;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.Variant.VARIANT;
+
+/**
+ *
+ */
+ @ComMethod(name = "Add", dispId = 0xc8)
+ Table Add(Range Range,
+ Integer NumRows,
+ Integer NumColumns,
+ Object DefaultTableBehavior,
+ Object AutoFitBehavior);
+
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdBreakType.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdBreakType.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdBreakType.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdBreakType.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,92 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({58B14C6F-0FE6-3BCA-880E-E3A9C039E588})
+ */
+public enum WdBreakType implements IComEnum {
+
+ /**
+ * (2)
+ */
+ wdSectionBreakNextPage(2),
+
+ /**
+ * (3)
+ */
+ wdSectionBreakContinuous(3),
+
+ /**
+ * (4)
+ */
+ wdSectionBreakEvenPage(4),
+
+ /**
+ * (5)
+ */
+ wdSectionBreakOddPage(5),
+
+ /**
+ * (6)
+ */
+ wdLineBreak(6),
+
+ /**
+ * (7)
+ */
+ wdPageBreak(7),
+
+ /**
+ * (8)
+ */
+ wdColumnBreak(8),
+
+ /**
+ * (9)
+ */
+ wdLineBreakClearLeft(9),
+
+ /**
+ * (10)
+ */
+ wdLineBreakClearRight(10),
+
+ /**
+ * (11)
+ */
+ wdTextWrappingBreak(11),
+ ;
+
+ private WdBreakType(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdCollapseDirection.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdCollapseDirection.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdCollapseDirection.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdCollapseDirection.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,52 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({2DEF3465-D4C4-369B-B91E-68C9711F3A6C})
+ */
+public enum WdCollapseDirection implements IComEnum {
+
+ /**
+ * (1)
+ */
+ wdCollapseStart(1),
+
+ /**
+ * (0)
+ */
+ wdCollapseEnd(0),
+ ;
+
+ private WdCollapseDirection(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportCreateBookmarks.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportCreateBookmarks.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportCreateBookmarks.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportCreateBookmarks.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,57 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({42A64EC8-BC68-3DBC-8BF0-58A8CBA4AB3E})
+ */
+public enum WdExportCreateBookmarks implements IComEnum {
+
+ /**
+ * (0)
+ */
+ wdExportCreateNoBookmarks(0),
+
+ /**
+ * (1)
+ */
+ wdExportCreateHeadingBookmarks(1),
+
+ /**
+ * (2)
+ */
+ wdExportCreateWordBookmarks(2),
+ ;
+
+ private WdExportCreateBookmarks(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportFormat.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportFormat.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportFormat.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportFormat.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,52 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({5D7E6F43-3E57-353C-95E1-52E9783BE2BE})
+ */
+public enum WdExportFormat implements IComEnum {
+
+ /**
+ * (17)
+ */
+ wdExportFormatPDF(17),
+
+ /**
+ * (18)
+ */
+ wdExportFormatXPS(18),
+ ;
+
+ private WdExportFormat(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportItem.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportItem.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportItem.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportItem.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,52 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({D67854FC-9A45-33F6-A4D3-DC0002A53CE9})
+ */
+public enum WdExportItem implements IComEnum {
+
+ /**
+ * (0)
+ */
+ wdExportDocumentContent(0),
+
+ /**
+ * (7)
+ */
+ wdExportDocumentWithMarkup(7),
+ ;
+
+ private WdExportItem(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportOptimizeFor.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportOptimizeFor.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportOptimizeFor.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportOptimizeFor.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,52 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({147553BC-4DC5-3681-A445-D1C4BEA414AD})
+ */
+public enum WdExportOptimizeFor implements IComEnum {
+
+ /**
+ * (0)
+ */
+ wdExportOptimizeForPrint(0),
+
+ /**
+ * (1)
+ */
+ wdExportOptimizeForOnScreen(1),
+ ;
+
+ private WdExportOptimizeFor(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportRange.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportRange.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportRange.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdExportRange.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,62 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({20D65698-7CDC-3A68-A83D-D52A76FEA1A4})
+ */
+public enum WdExportRange implements IComEnum {
+
+ /**
+ * (0)
+ */
+ wdExportAllDocument(0),
+
+ /**
+ * (1)
+ */
+ wdExportSelection(1),
+
+ /**
+ * (2)
+ */
+ wdExportCurrentPage(2),
+
+ /**
+ * (3)
+ */
+ wdExportFromTo(3),
+ ;
+
+ private WdExportRange(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdInformation.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdInformation.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdInformation.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdInformation.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,247 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({26E3C1D3-6937-3EFA-8859-7FFC81869CE5})
+ */
+public enum WdInformation implements IComEnum {
+
+ /**
+ * (1)
+ */
+ wdActiveEndAdjustedPageNumber(1),
+
+ /**
+ * (2)
+ */
+ wdActiveEndSectionNumber(2),
+
+ /**
+ * (3)
+ */
+ wdActiveEndPageNumber(3),
+
+ /**
+ * (4)
+ */
+ wdNumberOfPagesInDocument(4),
+
+ /**
+ * (5)
+ */
+ wdHorizontalPositionRelativeToPage(5),
+
+ /**
+ * (6)
+ */
+ wdVerticalPositionRelativeToPage(6),
+
+ /**
+ * (7)
+ */
+ wdHorizontalPositionRelativeToTextBoundary(7),
+
+ /**
+ * (8)
+ */
+ wdVerticalPositionRelativeToTextBoundary(8),
+
+ /**
+ * (9)
+ */
+ wdFirstCharacterColumnNumber(9),
+
+ /**
+ * (10)
+ */
+ wdFirstCharacterLineNumber(10),
+
+ /**
+ * (11)
+ */
+ wdFrameIsSelected(11),
+
+ /**
+ * (12)
+ */
+ wdWithInTable(12),
+
+ /**
+ * (13)
+ */
+ wdStartOfRangeRowNumber(13),
+
+ /**
+ * (14)
+ */
+ wdEndOfRangeRowNumber(14),
+
+ /**
+ * (15)
+ */
+ wdMaximumNumberOfRows(15),
+
+ /**
+ * (16)
+ */
+ wdStartOfRangeColumnNumber(16),
+
+ /**
+ * (17)
+ */
+ wdEndOfRangeColumnNumber(17),
+
+ /**
+ * (18)
+ */
+ wdMaximumNumberOfColumns(18),
+
+ /**
+ * (19)
+ */
+ wdZoomPercentage(19),
+
+ /**
+ * (20)
+ */
+ wdSelectionMode(20),
+
+ /**
+ * (21)
+ */
+ wdCapsLock(21),
+
+ /**
+ * (22)
+ */
+ wdNumLock(22),
+
+ /**
+ * (23)
+ */
+ wdOverType(23),
+
+ /**
+ * (24)
+ */
+ wdRevisionMarking(24),
+
+ /**
+ * (25)
+ */
+ wdInFootnoteEndnotePane(25),
+
+ /**
+ * (26)
+ */
+ wdInCommentPane(26),
+
+ /**
+ * (28)
+ */
+ wdInHeaderFooter(28),
+
+ /**
+ * (31)
+ */
+ wdAtEndOfRowMarker(31),
+
+ /**
+ * (32)
+ */
+ wdReferenceOfType(32),
+
+ /**
+ * (33)
+ */
+ wdHeaderFooterType(33),
+
+ /**
+ * (34)
+ */
+ wdInMasterDocument(34),
+
+ /**
+ * (35)
+ */
+ wdInFootnote(35),
+
+ /**
+ * (36)
+ */
+ wdInEndnote(36),
+
+ /**
+ * (37)
+ */
+ wdInWordMail(37),
+
+ /**
+ * (38)
+ */
+ wdInClipboard(38),
+
+ /**
+ * (41)
+ */
+ wdInCoverPage(41),
+
+ /**
+ * (42)
+ */
+ wdInBibliography(42),
+
+ /**
+ * (43)
+ */
+ wdInCitation(43),
+
+ /**
+ * (44)
+ */
+ wdInFieldCode(44),
+
+ /**
+ * (45)
+ */
+ wdInFieldResult(45),
+
+ /**
+ * (46)
+ */
+ wdInContentControl(46),
+ ;
+
+ private WdInformation(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdOriginalFormat.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdOriginalFormat.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdOriginalFormat.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdOriginalFormat.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,29 +1,40 @@
-/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform.win32.COM.util.office.word;
-
-import com.sun.jna.platform.win32.COM.util.IComEnum;
-
-public enum WdOriginalFormat implements IComEnum {
- wdOriginalDocumentFormat(1), // Original document format.
- wdPromptUser(2), // Prompt user to select a document format.
- wdWordDocument(0); // Microsoft Word document format.
-
- private WdOriginalFormat(long value) {
- this.value = value;
- }
- private long value;
- public long getValue() {
- return this.value;
- }
-}
+/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum WdOriginalFormat implements IComEnum {
+ wdOriginalDocumentFormat(1), // Original document format.
+ wdPromptUser(2), // Prompt user to select a document format.
+ wdWordDocument(0); // Microsoft Word document format.
+
+ private WdOriginalFormat(long value) {
+ this.value = value;
+ }
+ private long value;
+ public long getValue() {
+ return this.value;
+ }
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveFormat.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveFormat.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveFormat.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveFormat.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,54 +1,65 @@
-/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform.win32.COM.util.office.word;
-
-import com.sun.jna.platform.win32.COM.util.IComEnum;
-
-public enum WdSaveFormat implements IComEnum {
- wdFormatDocument(0), // Microsoft Office Word 97 - 2003 binary file format.
- wdFormatDOSText(4), // Microsoft DOS text format.
- wdFormatDOSTextLineBreaks(5), // Microsoft DOS text with line breaks preserved.
- wdFormatEncodedText(7), // Encoded text format.
- wdFormatFilteredHTML(10), // Filtered HTML format.
- wdFormatFlatXML(19), // Open XML file format saved as a single XML file.
- wdFormatFlatXMLMacroEnabled(20), // Open XML file format with macros enabled saved as a single XML file.
- wdFormatFlatXMLTemplate(21), // Open XML template format saved as a XML single file.
- wdFormatFlatXMLTemplateMacroEnabled(22), // Open XML template format with macros enabled saved as a single XML file.
- wdFormatOpenDocumentText(23), // OpenDocument Text format.
- wdFormatHTML(8), // Standard HTML format.
- wdFormatRTF(6), // Rich text format (RTF).
- wdFormatStrictOpenXMLDocument(24), // Strict Open XML document format.
- wdFormatTemplate(1), // Word template format.
- wdFormatText(2), // Microsoft Windows text format.
- wdFormatTextLineBreaks(3), //Windows text format with line breaks preserved.
- wdFormatUnicodeText( 7), //Unicode text format.
- wdFormatWebArchive(9), //Web archive format.
- wdFormatXML(11), //Extensible Markup Language (XML) format.
- wdFormatDocument97( 0), // Microsoft Word 97 document format.
- wdFormatDocumentDefault(16), // Word default document file format. For Word 2010, this is the DOCX format.
- wdFormatPDF( 17), //PDF format.
- wdFormatTemplate97( 1), // Word 97 template format.
- wdFormatXMLDocument( 12), //XML document format.
- wdFormatXMLDocumentMacroEnabled(13), //XML document format with macros enabled.
- wdFormatXMLTemplate(14), //XML template format.
- wdFormatXMLTemplateMacroEnabled(15), //XML template format with macros enabled.
- wdFormatXPS(18);
-
- private WdSaveFormat(long value) {
- this.value = value;
- }
- private long value;
- public long getValue() {
- return this.value;
- }
-}
+/* Copyright (c) 2014 Dr David H. Akehurst (itemis), All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+public enum WdSaveFormat implements IComEnum {
+ wdFormatDocument(0), // Microsoft Office Word 97 - 2003 binary file format.
+ wdFormatDOSText(4), // Microsoft DOS text format.
+ wdFormatDOSTextLineBreaks(5), // Microsoft DOS text with line breaks preserved.
+ wdFormatEncodedText(7), // Encoded text format.
+ wdFormatFilteredHTML(10), // Filtered HTML format.
+ wdFormatFlatXML(19), // Open XML file format saved as a single XML file.
+ wdFormatFlatXMLMacroEnabled(20), // Open XML file format with macros enabled saved as a single XML file.
+ wdFormatFlatXMLTemplate(21), // Open XML template format saved as a XML single file.
+ wdFormatFlatXMLTemplateMacroEnabled(22), // Open XML template format with macros enabled saved as a single XML file.
+ wdFormatOpenDocumentText(23), // OpenDocument Text format.
+ wdFormatHTML(8), // Standard HTML format.
+ wdFormatRTF(6), // Rich text format (RTF).
+ wdFormatStrictOpenXMLDocument(24), // Strict Open XML document format.
+ wdFormatTemplate(1), // Word template format.
+ wdFormatText(2), // Microsoft Windows text format.
+ wdFormatTextLineBreaks(3), //Windows text format with line breaks preserved.
+ wdFormatUnicodeText( 7), //Unicode text format.
+ wdFormatWebArchive(9), //Web archive format.
+ wdFormatXML(11), //Extensible Markup Language (XML) format.
+ wdFormatDocument97( 0), // Microsoft Word 97 document format.
+ wdFormatDocumentDefault(16), // Word default document file format. For Word 2010, this is the DOCX format.
+ wdFormatPDF( 17), //PDF format.
+ wdFormatTemplate97( 1), // Word 97 template format.
+ wdFormatXMLDocument( 12), //XML document format.
+ wdFormatXMLDocumentMacroEnabled(13), //XML document format with macros enabled.
+ wdFormatXMLTemplate(14), //XML template format.
+ wdFormatXMLTemplateMacroEnabled(15), //XML template format with macros enabled.
+ wdFormatXPS(18);
+
+ private WdSaveFormat(long value) {
+ this.value = value;
+ }
+ private long value;
+ public long getValue() {
+ return this.value;
+ }
+}
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveOptions.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveOptions.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveOptions.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/word/WdSaveOptions.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,57 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office.word;
+
+import com.sun.jna.platform.win32.COM.util.IComEnum;
+
+/**
+ *
uuid({E1B4A968-3072-3060-B6B7-1A1356D45CA2})
+ */
+public enum WdSaveOptions implements IComEnum {
+
+ /**
+ * (0)
+ */
+ wdDoNotSaveChanges(0),
+
+ /**
+ * (-1)
+ */
+ wdSaveChanges(-1),
+
+ /**
+ * (-2)
+ */
+ wdPromptToSaveChanges(-2),
+ ;
+
+ private WdSaveOptions(long value) {
+ this.value = value;
+ }
+ private long value;
+
+ public long getValue() {
+ return this.value;
+ }
+}
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Wordautomation_KB_313193_Mod.java libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Wordautomation_KB_313193_Mod.java
--- libjna-java-4.2.2/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Wordautomation_KB_313193_Mod.java 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/msoffice/src/com/sun/jna/platform/win32/COM/util/office/Wordautomation_KB_313193_Mod.java 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,226 @@
+/*
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+
+package com.sun.jna.platform.win32.COM.util.office;
+
+import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.COM.Helper;
+import com.sun.jna.platform.win32.COM.util.Factory;
+import com.sun.jna.platform.win32.COM.util.IDispatch;
+import com.sun.jna.platform.win32.COM.util.office.office.XlChartType;
+import com.sun.jna.platform.win32.COM.util.office.word.ComIApplication;
+import com.sun.jna.platform.win32.COM.util.office.word.ComIDocument;
+import com.sun.jna.platform.win32.COM.util.office.word.ComWord_Application;
+import com.sun.jna.platform.win32.COM.util.office.word.InlineShape;
+import com.sun.jna.platform.win32.COM.util.office.word.Paragraph;
+import com.sun.jna.platform.win32.COM.util.office.word.Range;
+import com.sun.jna.platform.win32.COM.util.office.word.Table;
+import com.sun.jna.platform.win32.COM.util.office.word.WdBreakType;
+import com.sun.jna.platform.win32.COM.util.office.word.WdCollapseDirection;
+import com.sun.jna.platform.win32.COM.util.office.word.WdExportCreateBookmarks;
+import com.sun.jna.platform.win32.COM.util.office.word.WdExportFormat;
+import com.sun.jna.platform.win32.COM.util.office.word.WdExportItem;
+import com.sun.jna.platform.win32.COM.util.office.word.WdExportOptimizeFor;
+import com.sun.jna.platform.win32.COM.util.office.word.WdExportRange;
+import com.sun.jna.platform.win32.COM.util.office.word.WdInformation;
+import com.sun.jna.platform.win32.COM.util.office.word.WdSaveOptions;
+import com.sun.jna.platform.win32.Ole32;
+import static com.sun.jna.platform.win32.Variant.VARIANT.VARIANT_MISSING;
+import java.io.File;
+
+
+import java.io.IOException;
+
+
+/**
+ * Based on VB sample: https://support.microsoft.com/de-de/kb/313193
+ *
+ *
This version of the sample runs without a visible word instance and in the
+ * end shuts down word. The process creates a PDF document, that is written to a
+ * temporary file, which name is printed.
+ *
+ *
Please note: The contained type-bindings are far from complete and only
+ * included as sample - please use one of the generators to generate complete
+ * bindings or enhance the coverage yourself.
+ */
+public class Wordautomation_KB_313193_Mod {
+ public static void main(String[] args) throws IOException {
+ // Initialize COM Subsystem
+ Ole32.INSTANCE.CoInitializeEx(Pointer.NULL, Ole32.COINIT_MULTITHREADED);
+ // Initialize Factory for COM object creation
+ Factory fact = new Factory();
+
+ try {
+ // oEndOfDoc is a predefined bookmark
+ final String oEndOfDoc = "\\endofdoc"; /* \endofdoc is a predefined bookmark */
+
+ // Start word application
+ ComWord_Application word = fact.createObject(ComWord_Application.class);
+ ComIApplication wordApp = word.queryInterface(ComIApplication.class);
+
+ // Make word visible/invisible (invisible is default)
+ wordApp.setVisible(true);
+
+ // Create an empty document (signiture of depends on bindings)
+ ComIDocument doc = wordApp.getDocuments().Add();
+
+ Helper.sleep(5);
+
+ //Insert a paragraph at the beginning of the document.
+ Paragraph para1 = doc.getContent().getParagraphs().Add(VARIANT_MISSING);
+ para1.getRange().setText("Heading 1");
+ para1.getRange().getFont().setBold(1);
+ //24 pt spacing after paragraph.
+ para1.getFormat().setSpaceAfter(24F);
+ para1.getRange().InsertParagraphAfter();
+
+ //Insert a paragraph at the end of the document.
+ Paragraph para2 = doc.getContent().getParagraphs().Add(doc.getBookmarks().Item(oEndOfDoc).getRange());
+ para2.getRange().setText("Heading 2");
+ para2.getFormat().setSpaceAfter(6F);
+ para2.getRange().InsertParagraphAfter();
+
+ //Insert another paragraph.
+ Paragraph para3 = doc.getContent().getParagraphs().Add(doc.getBookmarks().Item(oEndOfDoc).getRange());
+ para3.getRange().setText("This is a sentence of normal text. Now here is a table:");
+ para3.getRange().getFont().setBold(0);
+ para3.getFormat().setSpaceAfter(24F);
+ para3.getRange().InsertParagraphAfter();
+
+ //Insert a 3 x 5 table, fill it with data, and make the first row
+ //bold and italic.
+ Table table = doc.getTables().Add(doc.getBookmarks().Item(oEndOfDoc).getRange(),
+ 3, 5, VARIANT_MISSING, VARIANT_MISSING);
+ table.getRange().getParagraphFormat().setSpaceAfter(6F);
+ for(int r = 1; r <= 3; r++) {
+ for(int c = 1; c <= 5; c++) {
+ String strText = "r" + r + "c" + c;
+ table.Cell(r, c).getRange().setText(strText);
+ }
+ }
+ table.getRows().Item(1).getRange().getFont().setBold(1);
+ table.getRows().Item(1).getRange().getFont().setItalic(1);
+
+ //Add some text after the table.
+ Paragraph para4 = doc.getContent().getParagraphs().Add(doc.getBookmarks().Item(oEndOfDoc).getRange());
+ para4.getRange().InsertParagraphBefore();
+ para4.getRange().setText("And here's another table:");
+ para4.getFormat().setSpaceAfter(24F);
+ para4.getRange().InsertParagraphAfter();
+
+ //Insert a 5 x 2 table, fill it with data, and change the column widths.
+ table = doc.getTables().Add(doc.getBookmarks().Item(oEndOfDoc).getRange(), 5, 2, VARIANT_MISSING, VARIANT_MISSING);
+ table.getRange().getParagraphFormat().setSpaceAfter(6F);
+
+ for(int r = 1; r <= 5; r++) {
+ for(int c = 1; c <= 2; c++) {
+ String strText = "r" + r + "c" + c;
+ table.Cell(r, c).getRange().setText(strText);
+ }
+ }
+
+ //Change width of columns 1 & 2
+ table.getColumns().Item(1).setWidth(wordApp.InchesToPoints(2F));
+ table.getColumns().Item(2).setWidth(wordApp.InchesToPoints(3F));
+
+ //Keep inserting text. When you get to 7 inches from top of the
+ //document, insert a hard page break.
+ Range wrdRng;
+ float dPos = wordApp.InchesToPoints(7F);
+ doc.getBookmarks().Item(oEndOfDoc).getRange().InsertParagraphAfter();
+ do {
+ wrdRng = doc.getBookmarks().Item(oEndOfDoc).getRange();
+ wrdRng.getParagraphFormat().setSpaceAfter(6F);
+ wrdRng.InsertAfter("A line of text");
+ wrdRng.InsertParagraphAfter();
+ } while(dPos >= (Float) wrdRng.getInformation(WdInformation.wdVerticalPositionRelativeToPage));
+
+ wrdRng.Collapse(WdCollapseDirection.wdCollapseEnd);
+ wrdRng.InsertBreak(WdBreakType.wdPageBreak);
+ wrdRng.Collapse(WdCollapseDirection.wdCollapseEnd);
+ wrdRng.InsertAfter("We're now on page 2. Here's my chart:");
+ wrdRng.InsertParagraphAfter();
+
+ //Insert a chart and change the chart.
+ InlineShape oShape = doc.getBookmarks().Item(oEndOfDoc).getRange()
+ .getInlineShapes().AddOLEObject(
+ "MSGraph.Chart.8", "",
+ Boolean.FALSE, Boolean.FALSE, VARIANT_MISSING,
+ VARIANT_MISSING, VARIANT_MISSING, VARIANT_MISSING);
+
+ //Demonstrate use of late bound oChart and oChartApp objects to
+ //manipulate the chart object with MSGraph.
+ IDispatch oChart = oShape.getOLEFormat().getObject();
+ IDispatch oChartApp = oChart.getProperty(IDispatch.class, "Application");
+
+ //Change the chart type to Line
+ oChart.setProperty("ChartType", XlChartType.xlLine.getValue());
+
+ //Update the chart image and quit MSGraph.
+ oChartApp.invokeMethod(Void.class, "Update");
+ oChartApp.invokeMethod(Void.class, "Quit");
+
+ //... If desired, you can proceed from here using the Microsoft Graph
+ //Object model on the oChart and oChartApp objects to make additional
+ //changes to the chart.
+
+ //Set the width of the chart.
+ oShape.setWidth(wordApp.InchesToPoints(6.25f));
+ oShape.setHeight(wordApp.InchesToPoints(3.57f));
+
+ //Add text after the chart.
+ wrdRng = doc.getBookmarks().Item(oEndOfDoc).getRange();
+ wrdRng.InsertParagraphAfter();
+ wrdRng.InsertAfter("THE END.");
+
+ File tempFile = Helper.createNotExistingFile("KB_313193_", ".pdf");
+
+ doc.ExportAsFixedFormat(
+ tempFile.getAbsolutePath(),
+ WdExportFormat.wdExportFormatPDF,
+ Boolean.FALSE,
+ WdExportOptimizeFor.wdExportOptimizeForOnScreen,
+ WdExportRange.wdExportAllDocument,
+ null,
+ null,
+ WdExportItem.wdExportDocumentContent,
+ Boolean.FALSE,
+ Boolean.TRUE,
+ WdExportCreateBookmarks.wdExportCreateNoBookmarks,
+ Boolean.TRUE,
+ Boolean.FALSE,
+ Boolean.TRUE,
+ VARIANT_MISSING);
+
+ System.out.println("Output written to: " + tempFile.getAbsolutePath());
+
+ doc.Close(WdSaveOptions.wdDoNotSaveChanges, VARIANT_MISSING, VARIANT_MISSING);
+
+ wordApp.Quit();
+ } finally {
+ fact.disposeAll();
+ Ole32.INSTANCE.CoUninitialize();
+ }
+ }
+
+}
diff -Nru libjna-java-4.2.2/contrib/native_window_msg/build.xml libjna-java-4.4.0/contrib/native_window_msg/build.xml
--- libjna-java-4.2.2/contrib/native_window_msg/build.xml 1970-01-01 00:00:00.000000000 +0000
+++ libjna-java-4.4.0/contrib/native_window_msg/build.xml 2017-03-14 19:31:03.000000000 +0000
@@ -0,0 +1,68 @@
+
+
+ Builds, tests, and runs the project jnacontrib.native_window_msg.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -Nru libjna-java-4.2.2/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java libjna-java-4.4.0/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java
--- libjna-java-4.2.2/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/native_window_msg/src/com/sun/jna/platform/win32/Win32WindowDemo.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,39 +1,44 @@
/* Copyright (c) 2012 Tobias Wolf, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
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 +51,7 @@
*/
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 -Nru libjna-java-4.2.2/contrib/ntservice/build.xml libjna-java-4.4.0/contrib/ntservice/build.xml
--- libjna-java-4.2.2/contrib/ntservice/build.xml 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/build.xml 2017-03-14 19:31:03.000000000 +0000
@@ -1,69 +1,73 @@
-
-
-
-
-
- Builds, tests, and runs the project JnaContrib.
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Builds, tests, and runs the project ntservice.
+
+
+
diff -Nru libjna-java-4.2.2/contrib/ntservice/nbproject/genfiles.properties libjna-java-4.4.0/contrib/ntservice/nbproject/genfiles.properties
--- libjna-java-4.2.2/contrib/ntservice/nbproject/genfiles.properties 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/nbproject/genfiles.properties 2017-03-14 19:31:03.000000000 +0000
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=94714fd7
-build.xml.script.CRC32=64128189
-build.xml.stylesheet.CRC32=240b97a2
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=94714fd7
-nbproject/build-impl.xml.script.CRC32=9d2a0176
-nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
+build.xml.data.CRC32=a39dfef7
+build.xml.script.CRC32=aacb0c5e
+build.xml.stylesheet.CRC32=8064a381@1.79.1.48
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=94714fd7
+nbproject/build-impl.xml.script.CRC32=9d2a0176
+nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
diff -Nru libjna-java-4.2.2/contrib/ntservice/nbproject/project.properties libjna-java-4.4.0/contrib/ntservice/nbproject/project.properties
--- libjna-java-4.2.2/contrib/ntservice/nbproject/project.properties 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/nbproject/project.properties 2017-03-14 19:31:03.000000000 +0000
@@ -1,59 +1,61 @@
-application.args=
+#Tue Nov 15 21:31:35 CET 2016
+excludes=
+javac.deprecation=false
+build.test.results.dir=${build.dir}/test/results
+run.classpath=${javac.classpath}\:${build.classes.dir}
+javadoc.nonavbar=false
+javac.external.vm=false
+run.test.classpath=${javac.test.classpath}\:${build.test.classes.dir}
+javac.processorpath=${javac.classpath}
+javac.target=1.5
+annotation.processing.processors.list=
+javadoc.noindex=false
+javadoc.additionalparam=
+includes=**
build.classes.dir=${build.dir}/classes
-build.classes.excludes=**/*.java,**/*.form
-# This directory is removed when the project is cleaned:
+javadoc.author=false
+file.reference.jna-platform.jar=../platform/dist/jna-platform.jar
+test.src.dir=test
build.dir=build
-build.generated.dir=${build.dir}/generated
-# Only compile against the classpath explicitly listed here:
-build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
-build.test.results.dir=${build.dir}/test/results
-debug.classpath=\
- ${run.classpath}
-debug.test.classpath=\
- ${run.test.classpath}
-# This directory is removed when the project is cleaned:
-dist.dir=dist
+platform.active=default_platform
+javac.compilerargs=
+main.class=jnacontrib.win32.TestService
dist.jar=${dist.dir}/contrib-ntservice.jar
-dist.javadoc.dir=${dist.dir}/javadoc
+javadoc.use=true
+build.sysclasspath=ignore
+debug.test.classpath=${run.test.classpath}
+dist.dir=dist
+build.classes.excludes=**/*.java,**/*.form
+javadoc.splitindex=true
+javadoc.encoding=
+javac.source=1.5
file.reference.jna.jar=../../build/jna.jar
-libs.junit.classpath=../../lib/junit.jar
+application.vendor=matthias
+junit.selected.version=4
+debug.classpath=${run.classpath}
+run.jvmargs=
+build.generated.dir=${build.dir}/generated
jar.compress=false
-javac.classpath=\
- ${file.reference.jna.jar};
-# Space-separated list of extra javac options
-javac.compilerargs=
-javac.deprecation=false
-javac.source=1.5
-javac.target=1.5
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}:\
- ${libs.junit.classpath}
-javadoc.additionalparam=
-javadoc.author=false
-javadoc.encoding=
-javadoc.noindex=false
-javadoc.nonavbar=false
-javadoc.notree=false
+ ${libs.junit_4.classpath}:\
+ ${libs.hamcrest.classpath}
javadoc.private=false
-javadoc.splitindex=true
-javadoc.use=true
-javadoc.version=false
-javadoc.windowtitle=
-main.class=
-manifest.file=manifest.mf
+annotation.processing.run.all.processors=true
+application.title=ntservice
meta.inf.dir=${src.dir}/META-INF
-platform.active=default_platform
-run.classpath=\
- ${javac.classpath}:\
- ${build.classes.dir}
-# Space-separated list of JVM arguments used when running the project
-# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
-# or test-sys-prop.name=value to set system properties for unit tests):
-run.jvmargs=
-run.test.classpath=\
- ${javac.test.classpath}:\
- ${build.test.classes.dir}
+manifest.file=manifest.mf
+annotation.processing.enabled=true
+dist.javadoc.dir=${dist.dir}/javadoc
src.dir=src
-test.src.dir=test
+mkdist.disabled=false
+endorsed.classpath=
+javac.classpath=${file.reference.jna.jar}\:${file.reference.jna-platform.jar}
+annotation.processing.enabled.in.editor=false
+build.generated.sources.dir=${build.dir}/generated-sources
+application.args=
+javadoc.version=false
+javadoc.windowtitle=
+javadoc.notree=false
diff -Nru libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/Advapi32.java libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/Advapi32.java
--- libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/Advapi32.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/Advapi32.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,196 +1,659 @@
/*
- * Advapi32.java
- *
- * Created on 6. August 2007, 11:24
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package jnacontrib.jna;
-import java.util.Arrays;
import java.util.List;
import com.sun.jna.Native;
import com.sun.jna.Pointer;
import com.sun.jna.Structure;
-import com.sun.jna.WString;
+import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.ptr.IntByReference;
-import com.sun.jna.win32.StdCallLibrary;
import com.sun.jna.win32.W32APIOptions;
+import com.sun.jna.platform.win32.Winsvc.ChangeServiceConfig2Info;
+import com.sun.jna.platform.win32.Winsvc.SC_HANDLE;
+import com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS;
+import com.sun.jna.win32.W32APITypeMapper;
/**
- *
+ *
* @author TB
*/
-public interface Advapi32 extends StdCallLibrary {
- Advapi32 INSTANCE = (Advapi32) Native.loadLibrary("Advapi32",
- Advapi32.class, W32APIOptions.UNICODE_OPTIONS);
+public interface Advapi32 extends com.sun.jna.platform.win32.Advapi32 {
- /*
- * SC_HANDLE WINAPI OpenSCManager( LPCTSTR lpMachineName, LPCTSTR
- * lpDatabaseName, DWORD dwDesiredAccess );
- */
- public Pointer OpenSCManager(String lpMachineName, WString lpDatabaseName,
- int dwDesiredAccess);
-
- /*
- * BOOL WINAPI CloseServiceHandle( SC_HANDLE hSCObject );
- */
- public boolean CloseServiceHandle(Pointer hSCObject);
-
- /*
- * SC_HANDLE WINAPI OpenService( SC_HANDLE hSCManager, LPCTSTR
- * lpServiceName, DWORD dwDesiredAccess );
- */
- public Pointer OpenService(Pointer hSCManager, String lpServiceName,
- int dwDesiredAccess);
-
- /*
- * BOOL WINAPI StartService( SC_HANDLE hService, DWORD dwNumServiceArgs,
- * LPCTSTR* lpServiceArgVectors );
- */
- public boolean StartService(Pointer hService, int dwNumServiceArgs,
- char[] lpServiceArgVectors);
-
- /*
- * BOOL WINAPI ControlService( SC_HANDLE hService, DWORD dwControl,
- * LPSERVICE_STATUS lpServiceStatus );
- */
- public boolean ControlService(Pointer hService, int dwControl,
- SERVICE_STATUS lpServiceStatus);
-
- /*
- * BOOL WINAPI StartServiceCtrlDispatcher( const SERVICE_TABLE_ENTRY*
- * lpServiceTable );
- */
- public boolean StartServiceCtrlDispatcher(Structure[] lpServiceTable);
+ Advapi32 INSTANCE = Native.loadLibrary("Advapi32", Advapi32.class, W32APIOptions.DEFAULT_OPTIONS);
- /*
- * SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandler( LPCTSTR
- * lpServiceName, LPHANDLER_FUNCTION lpHandlerProc );
+ /**
+ * Connects the main thread of a service process to the service control
+ * manager, which causes the thread to be the service control dispatcher
+ * thread for the calling process.
+ *
+ * @param lpServiceTable A pointer to an array of SERVICE_TABLE_ENTRY
+ * structures containing one entry for each service
+ * that can execute in the calling process. The
+ * members of the last entry in the table must have
+ * NULL values to designate the end of the table.
+ *
+ * @return true if function succeeds. To get extended error information, call
+ * GetLastError. Possible error codes:
+ *
+ *
Return code
Description
+ *
ERROR_FAILED_SERVICE_CONTROLLER_CONNECT
This error is returned if the program is being run as a console application rather than as a service. If the program will be run as a console application for debugging purposes, structure it such that service-specific code is not called when this error is returned.
+ *
ERROR_INVALID_DATA
The specified dispatch table contains entries that are not in the proper format.
+ *
ERROR_SERVICE_ALREADY_RUNNING
The process has already called StartServiceCtrlDispatcher. Each process can call StartServiceCtrlDispatcher only one time.
+ *
+ */
+ public boolean StartServiceCtrlDispatcher(SERVICE_TABLE_ENTRY[] lpServiceTable);
+
+ /**
+ * Registers a function to handle service control requests.
+ *
+ *
This function has been superseded by the RegisterServiceCtrlHandlerEx
+ * function. A service can use either function, but the new function
+ * supports user-defined context data, and the new handler function supports
+ * additional extended control codes.
+ *
+ * @param lpServiceName The name of the service run by the calling thread.
+ * This is the service name that the service control
+ * program specified in the CreateService function when
+ * creating the service.
+ *
+ *
If the service type is SERVICE_WIN32_OWN_PROCESS,
+ * the function does not verify that the specified name
+ * is valid, because there is only one registered
+ * service in the process.
+ *
+ * @param lpHandlerProc A pointer to the handler function to be registered.
+ * For more information, see {@link Handler}.
+ *
+ * @return A service status handle, NULL on error. Call GetLastError to
+ * get extended error condition. Possible error codes:
+ *
+ *
Return code
Description
+ *
ERROR_NOT_ENOUGH_MEMORY
Not enough memory is available to convert an ANSI string parameter to Unicode. This error does not occur for Unicode string parameters.
+ *
ERROR_SERVICE_NOT_IN_EXE
The service entry was specified incorrectly when the process called the {@link #StartServiceCtrlDispatcher} function.
+ *
*/
- public Pointer RegisterServiceCtrlHandler(String lpServiceName,
+ public SERVICE_STATUS_HANDLE RegisterServiceCtrlHandler(String lpServiceName,
Handler lpHandlerProc);
- /*
- * SERVICE_STATUS_HANDLE WINAPI RegisterServiceCtrlHandlerEx( LPCTSTR
- * lpServiceName, LPHANDLER_FUNCTION_EX lpHandlerProc, LPVOID lpContext );
+ /**
+ * Registers a function to handle extended service control requests.
+ *
+ * @param lpServiceName The name of the service run by the calling thread.
+ * This is the service name that the service control
+ * program specified in the CreateService function when
+ * creating the service.
+ * @param lpHandlerProc The handler function to be registered.
+ * For more information, see HandlerEx.
+ * @param lpContext Any user-defined data. This parameter, which is
+ * passed to the handler function, can help identify
+ * the service when multiple services share a process.
+ *
+ * @return A service status handle on success, NULL on error. Call GetLastError
+ * to get extended information. Possible error codes:
+ *
+ *
Return code
Description
+ *
ERROR_NOT_ENOUGH_MEMORY
Not enough memory is available to convert an ANSI string parameter to Unicode. This error does not occur for Unicode string parameters.
+ *
ERROR_SERVICE_NOT_IN_EXE
The service entry was specified incorrectly when the process called the {@link #StartServiceCtrlDispatcher} function.
+ *
*/
- public Pointer RegisterServiceCtrlHandlerEx(String lpServiceName,
+ public SERVICE_STATUS_HANDLE RegisterServiceCtrlHandlerEx(String lpServiceName,
HandlerEx lpHandlerProc, Pointer lpContext);
- /*
- * BOOL WINAPI SetServiceStatus( SERVICE_STATUS_HANDLE hServiceStatus,
- * LPSERVICE_STATUS lpServiceStatus );
+ /**
+ * Updates the service control manager's status information for the calling
+ * service.
+ *
+ *
+ * @param hServiceStatus A handle to the status information structure for
+ * the current service. This handle is returned by
+ * the RegisterServiceCtrlHandlerEx function.
+ * @param lpServiceStatus A pointer to the SERVICE_STATUS structure the
+ * contains the latest status information for the
+ * calling service.
+ *
+ * @return true if function succeeds. To get extended error information, call
+ * GetLastError. Possible error codes:
+ *
+ *
Return code
Description
+ *
ERROR_INVALID_DATA
The specified service status structure is invalid.
+ *
ERROR_INVALID_HANDLE
The specified handle is invalid.
+ *
*/
- public boolean SetServiceStatus(Pointer hServiceStatus,
+ public boolean SetServiceStatus(SERVICE_STATUS_HANDLE hServiceStatus,
SERVICE_STATUS lpServiceStatus);
- /*
- * SC_HANDLE WINAPI CreateService( SC_HANDLE hSCManager, LPCTSTR
- * lpServiceName, LPCTSTR lpDisplayName, DWORD dwDesiredAccess, DWORD
- * dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCTSTR
- * lpBinaryPathName, LPCTSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCTSTR
- * lpDependencies, LPCTSTR lpServiceStartName, LPCTSTR lpPassword );
+ /**
+ * Creates a service object and adds it to the specified service control
+ * manager database.
+ *
+ * @param hSCManager [in] A handle to the service control manager
+ * database. This handle is returned by the
+ * OpenSCManager function and must have the
+ * SC_MANAGER_CREATE_SERVICE access right. For
+ * more information, see Service Security and
+ * Access Rights.
+ * @param lpServiceName [in] The name of the service to install. The
+ * maximum string length is 256 characters. The
+ * service control manager database preserves the
+ * case of the characters, but service name
+ * comparisons are always case insensitive.
+ * Forward-slash (/) and backslash (\) are not
+ * valid service name characters.
+ * @param lpDisplayName [in, optional] The display name to be used by
+ * user interface programs to identify the
+ * service. This string has a maximum length of
+ * 256 characters. The name is case-preserved in
+ * the service control manager. Display name
+ * comparisons are always case-insensitive.
+ * @param dwDesiredAccess [in] The access to the service. Before granting
+ * the requested access, the system checks the
+ * access token of the calling process. For a list
+ * of values, see Service Security and Access
+ * Rights.
+ * @param dwServiceType [in] The service type. This parameter can be
+ * one of the following values.
+ *
+ *
Value
Meaning
+ *
SERVICE_ADAPTER 0x00000004
Reserved.
+ *
SERVICE_FILE_SYSTEM_DRIVER 0x00000002
File system driver service.
+ *
SERVICE_KERNEL_DRIVER 0x00000001
Driver service.
+ *
SERVICE_RECOGNIZER_DRIVER 0x00000008
Reserved.
+ *
SERVICE_WIN32_OWN_PROCESS 0x00000010
Service that runs in its own process.
+ *
SERVICE_WIN32_SHARE_PROCESS 0x00000020
Service that shares a process with one or more other services. For more information, see Service Programs.
+ *
+ *
+ *
If you specify either SERVICE_WIN32_OWN_PROCESS or SERVICE_WIN32_SHARE_PROCESS, and the service is running in the context of the LocalSystem account, you can also specify the following value.
+ *
+ *
+ *
Value
Meaning
+ *
SERVICE_INTERACTIVE_PROCESS 0x00000100
The service can interact with the desktop.
+ *
+ *
+ * @param dwStartType [in] The service start options. This parameter
+ * can be one of the following values.
+ *
+ *
+ *
Value
Meaning
+ *
SERVICE_AUTO_START 0x00000002
A service started automatically by the service control manager during system startup.
+ *
SERVICE_BOOT_START 0x00000000
A device driver started by the system loader. This value is valid only for driver services.
+ *
SERVICE_DEMAND_START 0x00000003
A service started by the service control manager when a process calls the StartService function.
+ *
SERVICE_DISABLED 0x00000004
A service that cannot be started. Attempts to start the service result in the error code ERROR_SERVICE_DISABLED.
+ *
SERVICE_SYSTEM_START 0x00000001
A device driver started by the IoInitSystem function. This value is valid only for driver services.
+ *
+ *
+ * @param dwErrorControl [in] The severity of the error, and action
+ * taken, if this service fails to start. This
+ * parameter can be one of the following values.
+ *
+ *
+ *
Value
Meaning
+ *
SERVICE_ERROR_CRITICAL 0x00000003
The startup program logs the error in the event log, if possible. If the last-known-good configuration is being started, the startup operation fails. Otherwise, the system is restarted with the last-known good configuration.
+ *
SERVICE_ERROR_IGNORE 0x00000000
The startup program ignores the error and continues the startup operation.
+ *
SERVICE_ERROR_NORMAL 0x00000001
The startup program logs the error in the event log but continues the startup operation.
+ *
SERVICE_ERROR_SEVERE 0x00000002
The startup program logs the error in the event log. If the last-known-good configuration is being started, the startup operation continues. Otherwise, the system is restarted with the last-known-good configuration.
+ *
+ *
+ * @param lpBinaryPathName [in, optional] The fully qualified path to the
+ * service binary file. If the path contains a
+ * space, it must be quoted so that it is
+ * correctly interpreted. For example, "d:\\my
+ * share\\myservice.exe" should be specified as
+ * "\"d:\\my share\\myservice.exe\"".
+ *
+ *
The path can also include arguments for an
+ * auto-start service. For example,
+ * "d:\\myshare\\myservice.exe arg1 arg2". These
+ * passed to the service entry point (typically
+ * the main function).
+ *
+ *
If you specify a path on another computer,
+ * the share must be accessible by the computer
+ * account of the local computer because this is
+ * the security context used in the remote call.
+ * However, this requirement allows any potential
+ * vulnerabilities in the remote computer to
+ * affect the local computer. Therefore, it is
+ * best to use a local file.
+ *
+ * @param lpLoadOrderGroup [in, optional] The names of the load ordering
+ * group of which this service is a member.
+ * Specify NULL or an empty string if the service
+ * does not belong to a group.
+ *
+ *
The startup program uses load ordering
+ * groups to load groups of services in a
+ * specified order with respect to the other
+ * groups. The list of load ordering groups is
+ * contained in the following registry value:
+ * @param lpdwTagId [out, optional] A pointer to a variable that
+ * receives a tag value that is unique in the
+ * group specified in the lpLoadOrderGroup
+ * parameter. Specify NULL if you are not changing
+ * the existing tag.
+ *
+ *
You can use a tag for ordering service
+ * startup within a load ordering group by
+ * specifying a tag order vector in the following
+ * registry value:
Tags are only evaluated for driver services
+ * that have SERVICE_BOOT_START or
+ * SERVICE_SYSTEM_START start types.
+ * @param lpDependencies [in, optional] A pointer to a double
+ * null-terminated array of null-separated names
+ * of services or load ordering groups that the
+ * system must start before this service. Specify
+ * NULL or an empty string if the service has no
+ * dependencies. Dependency on a group means that
+ * this service can run if at least one member of
+ * the group is running after an attempt to start
+ * all members of the group.
+ *
+ *
You must prefix group names with
+ * SC_GROUP_IDENTIFIER so that they can be
+ * distinguished from a service name, because
+ * services and service groups share the same name
+ * space.
+ * @param lpServiceStartName [in, optional] The name of the account under
+ * which the service should run. If the service
+ * type is SERVICE_WIN32_OWN_PROCESS, use an
+ * account name in the form DomainName\UserName.
+ * The service process will be logged on as this
+ * user. If the account belongs to the built-in
+ * domain, you can specify .\UserName.
+ *
+ *
If this parameter is NULL, CreateService
+ * uses the LocalSystem account. If the service
+ * type specifies SERVICE_INTERACTIVE_PROCESS, the
+ * service must run in the LocalSystem account.
+ *
+ *
If this parameter is NT AUTHORITY\LocalService,
+ * CreateService uses the LocalService account. If
+ * the parameter is NT AUTHORITY\NetworkService,
+ * CreateService uses the NetworkService account.
+ *
+ *
A shared process can run as any user.
+ *
+ *
If the service type is SERVICE_KERNEL_DRIVER
+ * or SERVICE_FILE_SYSTEM_DRIVER, the name is the
+ * driver object name that the system uses to load
+ * the device driver. Specify NULL if the driver
+ * is to use a default object name created by the
+ * I/O system.
+ *
+ *
A service can be configured to use a managed
+ * account or a virtual account. If the service is
+ * configured to use a managed service account,
+ * the name is the managed service account name.
+ * If the service is configured to use a virtual
+ * account, specify the name as NT
+ * SERVICE\ServiceName. For more information about
+ * managed service accounts and virtual accounts,
+ * see the Service Accounts Step-by-Step Guide.
+ *
+ *
Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP:
+ * Managed service accounts and virtual accounts are not supported until
+ * Windows 7 and Windows Server 2008 R2.
+ * @param lpPassword [in, optional] The password to the account name
+ * specified by the lpServiceStartName parameter.
+ * Specify an empty string if the account has no
+ * password or if the service runs in the
+ * LocalService, NetworkService, or LocalSystem
+ * account. For more information, see Service
+ * Record List.
+ *
+ *
If the account name specified by the
+ * lpServiceStartName parameter is the name of a
+ * managed service account or virtual account
+ * name, the lpPassword parameter must be NULL.
+ *
+ *
Passwords are ignored for driver services.
+ *
+ * @return SC_HANDLE on success, NULL on error. Call GetLastError to
+ * get extended error condition. Possible error codes:
+ *
+ *
+ *
Return code
Description
+ *
ERROR_ACCESS_DENIED
The handle to the SCM database does not have the SC_MANAGER_CREATE_SERVICE access right.
+ *
ERROR_CIRCULAR_DEPENDENCY
A circular service dependency was specified.
+ *
ERROR_DUPLICATE_SERVICE_NAME
The display name already exists in the service control manager database either as a service name or as another display name.
+ *
ERROR_INVALID_HANDLE
The handle to the specified service control manager database is invalid.
+ *
ERROR_INVALID_NAME
The specified service name is invalid.
+ *
ERROR_INVALID_PARAMETER
A parameter that was specified is invalid.
+ *
ERROR_INVALID_SERVICE_ACCOUNT
The user account name specified in the lpServiceStartName parameter does not exist.
+ *
ERROR_SERVICE_EXISTS
The specified service already exists in this database.
+ *
ERROR_SERVICE_MARKED_FOR_DELETE
The specified service already exists in this database and has been marked for deletion.
+ *
*/
- public Pointer CreateService(Pointer hSCManager, String lpServiceName,
+ public SC_HANDLE CreateService(SC_HANDLE hSCManager, String lpServiceName,
String lpDisplayName, int dwDesiredAccess, int dwServiceType,
int dwStartType, int dwErrorControl, String lpBinaryPathName,
String lpLoadOrderGroup, IntByReference lpdwTagId,
String lpDependencies, String lpServiceStartName, String lpPassword);
- /*
- * BOOL WINAPI DeleteService( SC_HANDLE hService );
+ /**
+ * Marks the specified service for deletion from the service control manager database.
+ *
+ * @param hService [in] A handle to the service. This handle is returned by
+ * the OpenService or CreateService function, and it must
+ * have the DELETE access right.
+ *
+ * @return true if function succeeds. To get extended error information, call
+ * GetLastError. Possible error codes:
+ *
+ *
+ *
Return code
Description
+ *
ERROR_ACCESS_DENIED
The handle does not have the DELETE access right.
+ *
ERROR_INVALID_HANDLE
The specified handle is invalid.
+ *
ERROR_SERVICE_MARKED_FOR_DELETE
The specified service has already been marked for deletion.
+ *
*/
- public boolean DeleteService(Pointer hService);
-
- /*
- * BOOL WINAPI ChangeServiceConfig2( SC_HANDLE hService, DWORD dwInfoLevel,
- * LPVOID lpInfo );
- */
- public boolean ChangeServiceConfig2(Pointer hService, int dwInfoLevel,
- ChangeServiceConfig2Info lpInfo);
-
- /*
- * LONG WINAPI RegEnumValue( HKEY hKey, DWORD dwIndex, LPTSTR lpValueName,
- * LPDWORD lpcchValueName, LPDWORD lpReserved, LPDWORD lpType, LPBYTE
- * lpData, LPDWORD lpcbData );
- */
- public int RegEnumValue(int hKey, int dwIndex, char[] lpValueName,
- IntByReference lpcchValueName, IntByReference reserved,
- IntByReference lpType, byte[] lpData, IntByReference lpcbData);
+ public boolean DeleteService(SC_HANDLE hService);
+ /**
+ * The entry point for a service.
+ */
interface SERVICE_MAIN_FUNCTION extends StdCallCallback {
- /*
- * VOID WINAPI ServiceMain( DWORD dwArgc, LPTSTR* lpszArgv );
+
+ /**
+ *
+ * @param dwArgc [in] The number of arguments in the lpszArgv array.
+ * @param lpszArgv [in] The null-terminated argument strings passed to
+ * the service by the call to the StartService function
+ * that started the service. If there are no arguments,
+ * this parameter can be NULL. Otherwise, the first
+ * argument (lpszArgv[0]) is the name of the service,
+ * followed by any additional arguments (lpszArgv[1]
+ * through lpszArgv[dwArgc-1]).
+ *
+ *
If the user starts a manual service using the
+ * Services snap-in from the Control Panel, the strings
+ * for the lpszArgv parameter come from the properties
+ * dialog box for the service (from the Services snap-in,
+ * right-click the service entry, click Properties, and
+ * enter the parameters in Start parameters.)
*/
public void callback(int dwArgc, Pointer lpszArgv);
}
+ /**
+ * An application-defined callback function used with the
+ * RegisterServiceCtrlHandler function. A service program can use it as the
+ * control handler function of a particular service.
+ *
+ *
+ * This function has been superseded by the {@link HandlerEx} control handler
+ * function used with the {@link #RegisterServiceCtrlHandlerEx} function. A service
+ * can use either control handler, but the new control handler supports
+ * user-defined context data and additional extended control codes.
+ */
interface Handler extends StdCallCallback {
- /*
- * VOID WINAPI Handler( DWORD fdwControl );
+
+ /**
+ * @param fdwControl [in] The control code. This parameter can be one of
+ * the following values.
+ *
+ *
Control code
Meaning
+ *
SERVICE_CONTROL_CONTINUE 0x00000003
Notifies a paused service that it should resume.
+ *
SERVICE_CONTROL_INTERROGATE 0x00000004
Notifies a service that it should report its current status information to the service control manager. The handler should simply return NO_ERROR; the SCM is aware of the current state of the service.
+ *
SERVICE_CONTROL_NETBINDADD 0x00000007
Notifies a network service that there is a new component for binding. The service should bind to the new component. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_NETBINDDISABLE 0x0000000A
Notifies a network service that one of its bindings has been disabled. The service should reread its binding information and remove the binding. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_NETBINDENABLE 0x00000009
Notifies a network service that a disabled binding has been enabled. The service should reread its binding information and add the new binding. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_NETBINDREMOVE 0x00000008
Notifies a network service that a component for binding has been removed. The service should reread its binding information and unbind from the removed component. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_PARAMCHANGE 0x00000006
Notifies a service that its startup parameters have changed. The service should reread its startup parameters.
+ *
SERVICE_CONTROL_PAUSE 0x00000002
Notifies a service that it should pause.
+ *
SERVICE_CONTROL_SHUTDOWN 0x00000005
Notifies a service that the system is shutting down so the service can perform cleanup tasks. If a service accepts this control code, it must stop after it performs its cleanup tasks and return NO_ERROR. After the SCM sends this control code, it will not send other control codes to the service.
+ *
SERVICE_CONTROL_STOP 0x00000001
Notifies a service that it should stop. If a service accepts this control code, it must stop upon receipt and return NO_ERROR. After the SCM sends this control code, it does not send other control codes. Windows XP: If the service returns NO_ERROR and continues to run, it continues to receive control codes. This behavior changed starting with Windows Server 2003 and Windows XP with SP2.
+ *
+ *
+ *
This parameter can also be a user-defined control code, as described in the following table.
+ *
+ *
+ *
Control code
Meaning
+ *
Range 128 to 255.
The service defines the action associated with the control code.
+ *
*/
public void callback(int fdwControl);
}
+ /**
+ * An application-defined callback function used with the
+ * RegisterServiceCtrlHandlerEx function. A service program can use it as
+ * the control handler function of a particular service.
+ *
+ *
This function supersedes the Handler control handler function used
+ * with the {@link RegisterServiceCtrlHandler} function. A service can use either
+ * control handler, but the new control handler supports user-defined
+ * context data and additional extended control codes.
+ */
interface HandlerEx extends StdCallCallback {
- /*
- * DWORD WINAPI HandlerEx( DWORD dwControl, DWORD dwEventType, LPVOID
- * lpEventData, LPVOID lpContext );
+
+ /**
+ * @param dwControl [in] The control code. This parameter can be one of
+ * the following values.
+ *
+ *
Control code
Meaning
+ *
SERVICE_CONTROL_CONTINUE 0x00000003
Notifies a paused service that it should resume.
+ *
SERVICE_CONTROL_INTERROGATE 0x00000004
Notifies a service that it should report its current status information to the service control manager. The handler should simply return NO_ERROR; the SCM is aware of the current state of the service.
+ *
SERVICE_CONTROL_NETBINDADD 0x00000007
Notifies a network service that there is a new component for binding. The service should bind to the new component. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_NETBINDDISABLE 0x0000000A
Notifies a network service that one of its bindings has been disabled. The service should reread its binding information and remove the binding. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_NETBINDENABLE 0x00000009
Notifies a network service that a disabled binding has been enabled. The service should reread its binding information and add the new binding. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_NETBINDREMOVE 0x00000008
Notifies a network service that a component for binding has been removed. The service should reread its binding information and unbind from the removed component. Applications should use Plug and Play functionality instead.
+ *
SERVICE_CONTROL_PARAMCHANGE 0x00000006
Notifies a service that its startup parameters have changed. The service should reread its startup parameters.
+ *
SERVICE_CONTROL_PAUSE 0x00000002
Notifies a service that it should pause.
+ *
SERVICE_CONTROL_PRESHUTDOWN 0x0000000F
Notifies a service that the system will be shutting down. Services that need additional time to perform cleanup tasks beyond the tight time restriction at system shutdown can use this notification. The service control manager sends this notification to applications that have registered for it before sending a SERVICE_CONTROL_SHUTDOWN notification to applications that have registered for that notification. A service that handles this notification blocks system shutdown until the service stops or the preshutdown time-out interval specified through SERVICE_PRESHUTDOWN_INFO expires. Because this affects the user experience, services should use this feature only if it is absolutely necessary to avoid data loss or significant recovery time at the next system start. Windows Server 2003 and Windows XP: This value is not supported.
+ *
SERVICE_CONTROL_SHUTDOWN 0x00000005
Notifies a service that the system is shutting down so the service can perform cleanup tasks. If a service accepts this control code, it must stop after it performs its cleanup tasks and return NO_ERROR. After the SCM sends this control code, it will not send other control codes to the service.
+ *
SERVICE_CONTROL_STOP 0x00000001
Notifies a service that it should stop. If a service accepts this control code, it must stop upon receipt and return NO_ERROR. After the SCM sends this control code, it does not send other control codes. Windows XP: If the service returns NO_ERROR and continues to run, it continues to receive control codes. This behavior changed starting with Windows Server 2003 and Windows XP with SP2.
+ *
+ *
+ *
This parameter can also be one of the following extended control codes. Note that these control codes are not supported by the {@link Handler} function.
+ *
+ *
+ *
Control code
Meaning
+ *
SERVICE_CONTROL_DEVICEEVENT 0x0000000B
Notifies a service of device events. (The service must have registered to receive these notifications using the RegisterDeviceNotification function.) The dwEventType and lpEventData parameters contain additional information.
+ *
SERVICE_CONTROL_HARDWAREPROFILECHANGE 0x0000000C
Notifies a service that the computer's hardware profile has changed. The dwEventType parameter contains additional information.
+ *
SERVICE_CONTROL_POWEREVENT 0x0000000D
Notifies a service of system power events. The dwEventType parameter contains additional information. If dwEventType is PBT_POWERSETTINGCHANGE, the lpEventData parameter also contains additional information.
+ *
SERVICE_CONTROL_SESSIONCHANGE 0x0000000E
Notifies a service of session change events. Note that a service will only be notified of a user logon if it is fully loaded before the logon attempt is made. The dwEventType and lpEventData parameters contain additional information.
+ *
SERVICE_CONTROL_TIMECHANGE 0x00000010
Notifies a service that the system time has changed. The lpEventData parameter contains additional information. The dwEventType parameter is not used. Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This control code is not supported.
+ *
SERVICE_CONTROL_TRIGGEREVENT 0x00000020
Notifies a service registered for a service trigger event that the event has occurred. Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This control code is not supported.
+ *
SERVICE_CONTROL_USERMODEREBOOT 0x00000040
Notifies a service that the user has initiated a reboot. Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This control code is not supported.
+ *
+ *
+ *
This parameter can also be a user-defined control code, as described in the following table.
+ *
+ *
+ *
Control code
Meaning
+ *
Range 128 to 255.
The service defines the action associated with the control code.
+ *
+ *
+ * @param dwEventType The type of event that has occurred. This
+ * parameter is used if dwControl is
+ * SERVICE_CONTROL_DEVICEEVENT,
+ * SERVICE_CONTROL_HARDWAREPROFILECHANGE,
+ * SERVICE_CONTROL_POWEREVENT, or
+ * SERVICE_CONTROL_SESSIONCHANGE. Otherwise, it is
+ * zero.
+ *
+ *
If dwControl is SERVICE_CONTROL_DEVICEEVENT, this parameter can be
+ * one of the following values:
+ *
+ *
+ *
DBT_DEVICEARRIVAL
+ *
DBT_DEVICEREMOVECOMPLETE
+ *
DBT_DEVICEQUERYREMOVE
+ *
DBT_DEVICEQUERYREMOVEFAILED
+ *
DBT_DEVICEREMOVEPENDING DBT_CUSTOMEVENT
+ *
+ *
+ *
If dwControl is SERVICE_CONTROL_HARDWAREPROFILECHANGE, this parameter
+ * can be one of the following values:
+ *
+ *
+ *
DBT_CONFIGCHANGED
+ *
DBT_QUERYCHANGECONFIG
+ *
DBT_CONFIGCHANGECANCELED
+ *
+ *
+ *
If dwControl is SERVICE_CONTROL_POWEREVENT, this parameter can be one
+ * of the values specified in the wParam parameter of the
+ * WM_POWERBROADCAST message.
+ *
+ *
If dwControl is SERVICE_CONTROL_SESSIONCHANGE, this parameter can be
+ * one of the values specified in the wParam parameter of the
+ * WM_WTSSESSION_CHANGE message.
+ *
+ * @param lpEventData [in] Additional device information, if required.
+ * The format of this data depends on the value of
+ * the dwControl and dwEventType parameters.
+ *
+ *
If dwControl is SERVICE_CONTROL_DEVICEEVENT, this data corresponds to
+ * the lParam parameter that applications receive as part of a
+ * WM_DEVICECHANGE message.
+ *
+ *
If dwControl is SERVICE_CONTROL_POWEREVENT and dwEventType is
+ * PBT_POWERSETTINGCHANGE, this data is a pointer to a
+ * POWERBROADCAST_SETTING structure.
+ *
+ *
If dwControl is SERVICE_CONTROL_SESSIONCHANGE, this parameter is a
+ * pointer to a WTSSESSION_NOTIFICATION structure.
+ *
+ *
If dwControl is SERVICE_CONTROL_TIMECHANGE, this data is a pointer to
+ * a SERVICE_TIMECHANGE_INFO structure.
+ *
+ * @param lpContext [in] User-defined data passed from
+ * {@link RegisterServiceCtrlHandlerEx}. When multiple
+ * services share a process, the lpContext parameter
+ * can help identify the service.
+ *
+ * @return The return value for this function depends on the control
+ * code received.
+ *
+ *
The following list identifies the rules for this return value:
+ *
+ *
+ *
In general, if your service does not handle the control, return
+ * ERROR_CALL_NOT_IMPLEMENTED. However, your service should return
+ * NO_ERROR for SERVICE_CONTROL_INTERROGATE even if your service does
+ * not handle it.
+ *
If your service handles SERVICE_CONTROL_STOP or
+ * SERVICE_CONTROL_SHUTDOWN, return NO_ERROR.
+ *
If your service handles SERVICE_CONTROL_DEVICEEVENT, return
+ * NO_ERROR to grant the request and an error code to deny the
+ * request.
+ *
If your service handles SERVICE_CONTROL_HARDWAREPROFILECHANGE,
+ * return NO_ERROR to grant the request and an error code to deny the
+ * request.<
If your service handles
+ * SERVICE_CONTROL_POWEREVENT, return NO_ERROR to grant the request and
+ * an error code to deny the request.
+ *
For all other control codes your service handles, return
+ * NO_ERROR.
+ *
*/
public int callback(int dwControl, int dwEventType,
Pointer lpEventData, Pointer lpContext);
}
- /*
- * typedef struct _SERVICE_STATUS { DWORD dwServiceType; DWORD
- * dwCurrentState; DWORD dwControlsAccepted; DWORD dwWin32ExitCode; DWORD
- * dwServiceSpecificExitCode; DWORD dwCheckPoint; DWORD dwWaitHint; }
- * SERVICE_STATUS,LPSERVICE_STATUS;
- */
- public static class SERVICE_STATUS extends Structure {
- public int dwServiceType;
- public int dwCurrentState;
- public int dwControlsAccepted;
- public int dwWin32ExitCode;
- public int dwServiceSpecificExitCode;
- public int dwCheckPoint;
- public int dwWaitHint;
-
- protected List getFieldOrder() {
- return Arrays.asList(new String[] { "dwServiceType", "dwCurrentState", "dwControlsAccepted", "dwWin32ExitCode", "dwServiceSpecificExitCode", "dwCheckPoint", "dwWaitHint" });
- }
- }
-
- /*
- * typedef struct _SERVICE_TABLE_ENTRY { LPTSTR lpServiceName;
- * LPSERVICE_MAIN_FUNCTION lpServiceProc; } SERVICE_TABLE_ENTRY,
- * LPSERVICE_TABLE_ENTRY;
+ /**
+ * Specifies the ServiceMain function for a service that can run in the
+ * calling process. It is used by the StartServiceCtrlDispatcher function.
*/
public static class SERVICE_TABLE_ENTRY extends Structure {
+
+ public static final List FIELDS = createFieldsOrder("lpServiceName", "lpServiceProc");
+ /**
+ * The name of a service to be run in this service process.
+ *
+ *
+ * If the service is installed with the SERVICE_WIN32_OWN_PROCESS
+ * service type, this member is ignored, but cannot be NULL. This member
+ * can be an empty string ("").
+ *
+ * If the service is installed with the SERVICE_WIN32_SHARE_PROCESS
+ * service type, this member specifies the name of the service that uses
+ * the ServiceMain function pointed to by the lpServiceProc member.
+ */
public String lpServiceName;
public SERVICE_MAIN_FUNCTION lpServiceProc;
-
- protected List getFieldOrder() {
- return Arrays.asList(new String[] { "lpServiceName", "lpServiceProc" });
+
+ public SERVICE_TABLE_ENTRY() {
+ super(W32APITypeMapper.DEFAULT);
}
- }
- public static abstract class ChangeServiceConfig2Info extends Structure {
+ @Override
+ protected List getFieldOrder() {
+ return FIELDS;
+ }
}
- /*
- * typedef struct _SERVICE_DESCRIPTION { LPTSTR lpDescription; }
- * SERVICE_DESCRIPTION,LPSERVICE_DESCRIPTION;
+ /**
+ *
+ * Contains a service description.
+ *
+ *
+ * The description of the service. If this member is NULL, the description
+ * remains unchanged. If this value is an empty string (""), the current
+ * description is deleted.
+ *
+ * The service description must not exceed the size of a registry value of
+ * type REG_SZ.
+ *
+ * This member can specify a localized string using the following
+ * format:
+ *
+ * @[path\]dllname,-strID
+ *
+ * The string with identifier strID is loaded from dllname; the path is
+ * optional. For more information, see RegLoadMUIString.
+ *
+ * Windows Server 2003 and Windows XP: Localized strings
+ * are not supported until Windows Vista.
+ *
*/
public static class SERVICE_DESCRIPTION extends ChangeServiceConfig2Info {
+
+ public static final List FIELDS = createFieldsOrder("lpDescription");
public String lpDescription;
-
- protected List getFieldOrder() {
- return Arrays.asList(new String[] { "lpDescription" });
+
+ @Override
+ protected List getFieldOrder() {
+ return FIELDS;
+ }
+ }
+
+ public static class SERVICE_STATUS_HANDLE extends WinNT.HANDLE {
+
+ public SERVICE_STATUS_HANDLE() {
+ }
+
+ public SERVICE_STATUS_HANDLE(Pointer p) {
+ super(p);
}
}
}
diff -Nru libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/WINERROR.java libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/WINERROR.java
--- libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/WINERROR.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/WINERROR.java 1970-01-01 00:00:00.000000000 +0000
@@ -1,22 +0,0 @@
-/*
- * WINERROR.java
- *
- * Created on 7. August 2007, 08:09
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-package jnacontrib.jna;
-
-
-/**
- *
- * @author TB
- */
-public interface WINERROR {
- public final static int ERROR_SUCCESS = 0;
- public final static int NO_ERROR = 0;
- public final static int ERROR_FILE_NOT_FOUND = 2;
- public final static int ERROR_MORE_DATA = 234;
-}
diff -Nru libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/WINNT.java libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/WINNT.java
--- libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/WINNT.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/WINNT.java 1970-01-01 00:00:00.000000000 +0000
@@ -1,36 +0,0 @@
-/*
- * WINNT.java
- *
- * Created on 8. August 2007, 13:41
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-package jnacontrib.jna;
-
-/**
- *
- * @author TB
- */
-public interface WINNT {
- public final static int DELETE = 0x00010000;
- public final static int READ_CONTROL = 0x00020000;
- public final static int WRITE_DAC = 0x00040000;
- public final static int WRITE_OWNER = 0x00080000;
- public final static int SYNCHRONIZE = 0x00100000;
-
- public final static int STANDARD_RIGHTS_REQUIRED = 0x000F0000;
-
- public final static int STANDARD_RIGHTS_READ = READ_CONTROL;
- public final static int STANDARD_RIGHTS_WRITE = READ_CONTROL;
- public final static int STANDARD_RIGHTS_EXECUTE = READ_CONTROL;
-
- public final static int STANDARD_RIGHTS_ALL = 0x001F0000;
-
- public final static int SPECIFIC_RIGHTS_ALL = 0x0000FFFF;
-
- public final static int GENERIC_EXECUTE = 0x20000000;
-
- public final static int SERVICE_WIN32_OWN_PROCESS = 0x00000010;
-}
diff -Nru libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/WINSVC.java libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/WINSVC.java
--- libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/jna/WINSVC.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/jna/WINSVC.java 1970-01-01 00:00:00.000000000 +0000
@@ -1,104 +0,0 @@
-/*
- * WINSVC.java
- *
- * Created on 8. August 2007, 15:07
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
- */
-
-package jnacontrib.jna;
-
-
-/**
- *
- * @author TB
- */
-public interface WINSVC {
- public final static int SERVICE_CONTROL_STOP = 0x00000001;
- public final static int SERVICE_CONTROL_SHUTDOWN = 0x00000005;
-
- public final static int SERVICE_STOPPED = 0x00000001;
- public final static int SERVICE_START_PENDING = 0x00000002;
- public final static int SERVICE_STOP_PENDING = 0x00000003;
- public final static int SERVICE_RUNNING = 0x00000004;
- public final static int SERVICE_CONTINUE_PENDING = 0x00000005;
- public final static int SERVICE_PAUSE_PENDING = 0x00000006;
- public final static int SERVICE_PAUSED = 0x00000007;
-
- public final static int SERVICE_ACCEPT_STOP = 0x00000001;
- public final static int SERVICE_ACCEPT_PAUSE_CONTINUE = 0x00000002;
- public final static int SERVICE_ACCEPT_SHUTDOWN = 0x00000004;
- public final static int SERVICE_ACCEPT_PARAMCHANGE = 0x00000008;
- public final static int SERVICE_ACCEPT_NETBINDCHANGE = 0x00000010;
-
- public final static int SC_MANAGER_CONNECT = 0x0001;
- public final static int SC_MANAGER_CREATE_SERVICE = 0x0002;
- public final static int SC_MANAGER_ENUMERATE_SERVICE = 0x0004;
- public final static int SC_MANAGER_LOCK = 0x0008;
- public final static int SC_MANAGER_QUERY_LOCK_STATUS = 0x0010;
- public final static int SC_MANAGER_MODIFY_BOOT_CONFIG = 0x0020;
-
- public final static int SC_MANAGER_ALL_ACCESS = WINNT.STANDARD_RIGHTS_REQUIRED |
- SC_MANAGER_CONNECT |
- SC_MANAGER_CREATE_SERVICE |
- SC_MANAGER_ENUMERATE_SERVICE |
- SC_MANAGER_LOCK |
- SC_MANAGER_QUERY_LOCK_STATUS |
- SC_MANAGER_MODIFY_BOOT_CONFIG;
-
- public final static int SERVICE_QUERY_CONFIG = 0x0001;
- public final static int SERVICE_CHANGE_CONFIG = 0x0002;
- public final static int SERVICE_QUERY_STATUS = 0x0004;
- public final static int SERVICE_ENUMERATE_DEPENDENTS = 0x0008;
- public final static int SERVICE_START = 0x0010;
- public final static int SERVICE_STOP = 0x0020;
- public final static int SERVICE_PAUSE_CONTINUE = 0x0040;
- public final static int SERVICE_INTERROGATE = 0x0080;
- public final static int SERVICE_USER_DEFINED_CONTROL = 0x0100;
-
- public final static int SERVICE_ALL_ACCESS = WINNT.STANDARD_RIGHTS_REQUIRED |
- SERVICE_QUERY_CONFIG |
- SERVICE_CHANGE_CONFIG |
- SERVICE_QUERY_STATUS |
- SERVICE_ENUMERATE_DEPENDENTS |
- SERVICE_START |
- SERVICE_STOP |
- SERVICE_PAUSE_CONTINUE |
- SERVICE_INTERROGATE |
- SERVICE_USER_DEFINED_CONTROL;
-
- public final static int SERVICE_CONFIG_DESCRIPTION = 1;
- public final static int SERVICE_CONFIG_FAILURE_ACTIONS = 2;
-
- public final static int SERVICE_KERNEL_DRIVER = 0x00000001;
- public final static int SERVICE_FILE_SYSTEM_DRIVER = 0x00000002;
- public final static int SERVICE_ADAPTER = 0x00000004;
- public final static int SERVICE_RECOGNIZER_DRIVER = 0x00000008;
-
- public final static int SERVICE_DRIVER = SERVICE_KERNEL_DRIVER |
- SERVICE_FILE_SYSTEM_DRIVER |
- SERVICE_RECOGNIZER_DRIVER;
-
- public final static int SERVICE_WIN32_OWN_PROCESS = 0x00000010;
- public final static int SERVICE_WIN32_SHARE_PROCESS = 0x00000020;
- public final static int SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS;
-
- public final static int SERVICE_INTERACTIVE_PROCESS = 0x00000100;
-
- public final static int SERVICE_TYPE_ALL = SERVICE_WIN32 |
- SERVICE_ADAPTER |
- SERVICE_DRIVER |
- SERVICE_INTERACTIVE_PROCESS;
-
- public final static int SERVICE_BOOT_START = 0x00000000;
- public final static int SERVICE_SYSTEM_START = 0x00000001;
- public final static int SERVICE_AUTO_START = 0x00000002;
- public final static int SERVICE_DEMAND_START = 0x00000003;
- public final static int SERVICE_DISABLED = 0x00000004;
-
- public final static int SERVICE_ERROR_IGNORE = 0x00000000;
- public final static int SERVICE_ERROR_NORMAL = 0x00000001;
- public final static int SERVICE_ERROR_SEVERE = 0x00000002;
- public final static int SERVICE_ERROR_CRITICAL = 0x00000003;
-}
diff -Nru libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/win32/TestService.java libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/win32/TestService.java
--- libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/win32/TestService.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/win32/TestService.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,10 +1,24 @@
/*
- * TestService.java
- *
- * Created on 12. September 2007, 12:49
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package jnacontrib.win32;
diff -Nru libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/win32/Win32Service.java libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/win32/Win32Service.java
--- libjna-java-4.2.2/contrib/ntservice/src/jnacontrib/win32/Win32Service.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/ntservice/src/jnacontrib/win32/Win32Service.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,16 +1,41 @@
/*
- * Win32Service.java
- *
- * Created on 12. September 2007, 12:05
- *
- * To change this template, choose Tools | Template Manager
- * and open the template in the editor.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package jnacontrib.win32;
import jnacontrib.jna.*;
import com.sun.jna.Pointer;
+import com.sun.jna.platform.win32.WinError;
+import com.sun.jna.platform.win32.WinNT;
+import com.sun.jna.platform.win32.Winsvc;
+import com.sun.jna.platform.win32.Winsvc.SC_HANDLE;
+import com.sun.jna.platform.win32.Winsvc.SERVICE_STATUS;
+import java.io.File;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import jnacontrib.jna.Advapi32.SERVICE_STATUS_HANDLE;
+import jnacontrib.jna.Advapi32.SERVICE_TABLE_ENTRY;
/**
* Baseclass for a Win32 service.
@@ -19,7 +44,7 @@
protected String serviceName;
private ServiceMain serviceMain;
private ServiceControl serviceControl;
- private Pointer serviceStatusHandle;
+ private SERVICE_STATUS_HANDLE serviceStatusHandle;
private Object waitObject = new Object();
/**
@@ -39,12 +64,34 @@
* @param dependencies array of other services to depend on or null
* @param account service account or null for LocalSystem
* @param password password for service account or null
- * @throws java.lang.Exception
* @return true on success
*/
public boolean install(String displayName, String description, String[] dependencies, String account, String password) {
- return(install(displayName, description, dependencies, account, password, "java.exe -cp \"" +
- System.getProperty("java.class.path") + "\" -Xrs " + this.getClass().getName()));
+ // This needs to be adjusted for a production implementation!
+ //
+ // Determine the JVM used to invoke this installer and use it as
+ // runtime for the service
+ String javaHome = System.getProperty("java.home");
+ String javaBinary = javaHome + "\\bin\\java.exe";
+ // Assumption: This is started as:
+ //
+ // java -jar
+ //
+ // This is not portable, as it assumes, that this establishes a CL hierachy,
+ // that starts with one ClassLoader that loads the main jar (this service
+ // implementation) and its childs are resposible for loading referenced
+ // jars.
+ URLClassLoader cl = (URLClassLoader) Win32Service.class.getClassLoader();
+ URL jarPath = cl.getURLs()[0];
+
+ try {
+ File jar = new File(jarPath.toURI());
+ return(install(displayName, description, dependencies, account, password,
+ javaBinary + " -jar \"" + jar.getAbsolutePath() + "\""
+ ));
+ } catch (URISyntaxException ex) {
+ return false;
+ }
}
/**
@@ -62,7 +109,7 @@
public boolean install(String displayName, String description, String[] dependencies, String account, String password, String command) {
Advapi32 advapi32;
Advapi32.SERVICE_DESCRIPTION desc;
- Pointer serviceManager, service;
+ SC_HANDLE service, serviceManager;
boolean success = false;
String dep = "";
@@ -77,17 +124,17 @@
desc.lpDescription = description;
advapi32 = Advapi32.INSTANCE;
- serviceManager = openServiceControlManager(null, WINSVC.SC_MANAGER_ALL_ACCESS);
+ serviceManager = openServiceControlManager(null, Winsvc.SC_MANAGER_ALL_ACCESS);
if(serviceManager != null) {
service = advapi32.CreateService(serviceManager, serviceName, displayName,
- WINSVC.SERVICE_ALL_ACCESS, WINSVC.SERVICE_WIN32_OWN_PROCESS, WINSVC.SERVICE_DEMAND_START,
- WINSVC.SERVICE_ERROR_NORMAL,
+ Winsvc.SERVICE_ALL_ACCESS, WinNT.SERVICE_WIN32_OWN_PROCESS, WinNT.SERVICE_DEMAND_START,
+ WinNT.SERVICE_ERROR_NORMAL,
command,
null, null, dep, account, password);
if(service != null) {
- success = advapi32.ChangeServiceConfig2(service, WINSVC.SERVICE_CONFIG_DESCRIPTION, desc);
+ success = advapi32.ChangeServiceConfig2(service, Winsvc.SERVICE_CONFIG_DESCRIPTION, desc);
advapi32.CloseServiceHandle(service);
}
advapi32.CloseServiceHandle(serviceManager);
@@ -103,14 +150,14 @@
*/
public boolean uninstall() {
Advapi32 advapi32;
- Pointer serviceManager, service;
+ SC_HANDLE serviceManager, service;
boolean success = false;
advapi32 = Advapi32.INSTANCE;
- serviceManager = openServiceControlManager(null, WINSVC.SC_MANAGER_ALL_ACCESS);
+ serviceManager = openServiceControlManager(null, Winsvc.SC_MANAGER_ALL_ACCESS);
if(serviceManager != null) {
- service = advapi32.OpenService(serviceManager, serviceName, WINSVC.SERVICE_ALL_ACCESS);
+ service = advapi32.OpenService(serviceManager, serviceName, Winsvc.SERVICE_ALL_ACCESS);
if(service != null) {
success = advapi32.DeleteService(service);
@@ -127,15 +174,15 @@
*/
public boolean start() {
Advapi32 advapi32;
- Pointer serviceManager, service;
+ SC_HANDLE serviceManager, service;
boolean success = false;
advapi32 = Advapi32.INSTANCE;
- serviceManager = openServiceControlManager(null, WINNT.GENERIC_EXECUTE);
+ serviceManager = openServiceControlManager(null, WinNT.GENERIC_EXECUTE);
if(serviceManager != null) {
- service = advapi32.OpenService(serviceManager, serviceName, WINNT.GENERIC_EXECUTE);
+ service = advapi32.OpenService(serviceManager, serviceName, WinNT.GENERIC_EXECUTE);
if(service != null) {
success = advapi32.StartService(service, 0, null);
@@ -153,20 +200,20 @@
*/
public boolean stop() throws Exception {
Advapi32 advapi32;
- Pointer serviceManager, service;
- Advapi32.SERVICE_STATUS serviceStatus;
+ SC_HANDLE serviceManager, service;
+ SERVICE_STATUS serviceStatus;
boolean success = false;
advapi32 = Advapi32.INSTANCE;
- serviceManager = openServiceControlManager(null, WINNT.GENERIC_EXECUTE);
+ serviceManager = openServiceControlManager(null, WinNT.GENERIC_EXECUTE);
if(serviceManager != null) {
- service = advapi32.OpenService(serviceManager, serviceName, WINNT.GENERIC_EXECUTE);
+ service = advapi32.OpenService(serviceManager, serviceName, WinNT.GENERIC_EXECUTE);
if(service != null) {
- serviceStatus = new Advapi32.SERVICE_STATUS();
- success = advapi32.ControlService(service, WINSVC.SERVICE_CONTROL_STOP, serviceStatus);
+ serviceStatus = new SERVICE_STATUS();
+ success = advapi32.ControlService(service, Winsvc.SERVICE_CONTROL_STOP, serviceStatus);
advapi32.CloseServiceHandle(service);
}
advapi32.CloseServiceHandle(serviceManager);
@@ -180,7 +227,7 @@
*/
public void init() {
Advapi32 advapi32;
- Advapi32.SERVICE_TABLE_ENTRY entry;
+ SERVICE_TABLE_ENTRY entry;
serviceMain = new ServiceMain();
advapi32 = Advapi32.INSTANCE;
@@ -188,7 +235,7 @@
entry.lpServiceName = serviceName;
entry.lpServiceProc = serviceMain;
- advapi32.StartServiceCtrlDispatcher(entry.toArray(2));
+ advapi32.StartServiceCtrlDispatcher((SERVICE_TABLE_ENTRY[]) entry.toArray(2));
}
/**
@@ -198,8 +245,8 @@
* @param access access flags
* @return handle to ServiceControlManager or null when failed
*/
- private Pointer openServiceControlManager(String machine, int access) {
- Pointer handle = null;
+ private SC_HANDLE openServiceControlManager(String machine, int access) {
+ SC_HANDLE handle = null;
Advapi32 advapi32;
advapi32 = Advapi32.INSTANCE;
@@ -216,12 +263,12 @@
*/
private void reportStatus(int status, int win32ExitCode, int waitHint) {
Advapi32 advapi32;
- Advapi32.SERVICE_STATUS serviceStatus;
+ SERVICE_STATUS serviceStatus;
advapi32 = Advapi32.INSTANCE;
- serviceStatus = new Advapi32.SERVICE_STATUS();
- serviceStatus.dwServiceType = WINNT.SERVICE_WIN32_OWN_PROCESS;
- serviceStatus.dwControlsAccepted = WINSVC.SERVICE_ACCEPT_STOP | WINSVC.SERVICE_ACCEPT_SHUTDOWN;
+ serviceStatus = new SERVICE_STATUS();
+ serviceStatus.dwServiceType = WinNT.SERVICE_WIN32_OWN_PROCESS;
+ serviceStatus.dwControlsAccepted = Winsvc.SERVICE_ACCEPT_STOP | Winsvc.SERVICE_ACCEPT_SHUTDOWN;
serviceStatus.dwWin32ExitCode = win32ExitCode;
serviceStatus.dwWaitHint = waitHint;
serviceStatus.dwCurrentState = status;
@@ -259,8 +306,8 @@
serviceControl = new ServiceControl();
serviceStatusHandle = advapi32.RegisterServiceCtrlHandlerEx(serviceName, serviceControl, null);
- reportStatus(WINSVC.SERVICE_START_PENDING, WINERROR.NO_ERROR, 3000);
- reportStatus(WINSVC.SERVICE_RUNNING, WINERROR.NO_ERROR, 0);
+ reportStatus(Winsvc.SERVICE_START_PENDING, WinError.NO_ERROR, 3000);
+ reportStatus(Winsvc.SERVICE_RUNNING, WinError.NO_ERROR, 0);
onStart();
@@ -270,7 +317,7 @@
}
} catch (InterruptedException ex) {
}
- reportStatus(WINSVC.SERVICE_STOPPED, WINERROR.NO_ERROR, 0);
+ reportStatus(Winsvc.SERVICE_STOPPED, WinError.NO_ERROR, 0);
// Avoid returning from ServiceMain, which will cause a crash
// See http://support.microsoft.com/kb/201349, which recommends
@@ -296,15 +343,15 @@
*/
public int callback(int dwControl, int dwEventType, Pointer lpEventData, Pointer lpContext) {
switch(dwControl) {
- case WINSVC.SERVICE_CONTROL_STOP:
- case WINSVC.SERVICE_CONTROL_SHUTDOWN:
- reportStatus(WINSVC.SERVICE_STOP_PENDING, WINERROR.NO_ERROR, 5000);
+ case Winsvc.SERVICE_CONTROL_STOP:
+ case Winsvc.SERVICE_CONTROL_SHUTDOWN:
+ reportStatus(Winsvc.SERVICE_STOP_PENDING, WinError.NO_ERROR, 5000);
onStop();
synchronized(waitObject) {
waitObject.notifyAll();
}
}
- return WINERROR.NO_ERROR;
+ return WinError.NO_ERROR;
}
}
}
diff -Nru libjna-java-4.2.2/contrib/platform/build.xml libjna-java-4.4.0/contrib/platform/build.xml
--- libjna-java-4.2.2/contrib/platform/build.xml 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/build.xml 2017-03-14 19:31:03.000000000 +0000
@@ -64,31 +64,31 @@
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
Running platform tests: ${test.src.dir}
-
-
- Saving test results in ${build.test.results.dir.abs}
-
+
+
+
+ Saving test results in ${results.junit}
+
-
+
-
+
@@ -151,23 +150,23 @@
-
+
-
+
-
-
+
+
-
+
-
+ One or more tests failed
diff -Nru libjna-java-4.2.2/contrib/platform/nbproject/build-impl.xml libjna-java-4.4.0/contrib/platform/nbproject/build-impl.xml
--- libjna-java-4.2.2/contrib/platform/nbproject/build-impl.xml 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/nbproject/build-impl.xml 2017-03-14 19:31:03.000000000 +0000
@@ -12,52 +12,112 @@
- execution
- debugging
- javadoc
- - junit compilation
- - junit execution
- - junit debugging
+ - test compilation
+ - test execution
+ - test debugging
- applet
- cleanup
--->
-
-
+ -->
+
+
+
+
+
+
+
+
+
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
-
+
+
+
-
+
-
+
+
-
+
+
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -77,9 +137,13 @@
-
+
+
+
+
+
@@ -89,12 +153,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+ Must set src.dirMust set test.src.dirMust set build.dir
@@ -115,53 +249,488 @@
-
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set javac.includes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
-
-
-
-
+
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ No tests executed.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must set JVM to use for profiling in profiler.info.jvm
+ Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
+
+
+
-
-
-
+
+
+
-
+
@@ -169,32 +738,56 @@
-
+
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
-
+
@@ -203,305 +796,556 @@
-
+
+
+
-
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
-
+
-
+ Must select some files in the IDE or set javac.includes
-
-
-
-
-
+
+
-
+
-
-
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+
+
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ To run this application from the command line without Ant, try:
+
+ java -jar "${dist.jar.resolved}"
+
+
+
+
+
- java -cp "${run.classpath.with.dist.jar}" ${main.class}
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- To run this application from the command line without Ant, try:
-
- java -jar "${dist.jar.resolved}"
+
+
+
+
+
+
-
+
+
-
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+
-
+
+
+
+ Must select one file in the IDE or set run.class
+
+ Must select one file in the IDE or set run.class
+
+
-
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+
-
+
+
+
+
-
-
+
+
-
-
+
+ Must select one file in the IDE or set debug.class
-
-
+
+
+ Must select one file in the IDE or set debug.class
+
+
+
+ Must set fix.includes
-
+
-
+
+
-
+ pre NB7.2 profiler integration
+ -->
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set profile.class
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+ This target only works when run from inside the NetBeans IDE.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+
+ Must select some files in the IDE or set test.includes
+
+
+
+
+ Must select one file in the IDE or set run.class
+
+
+
+
+ Must select one file in the IDE or set applet.url
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+ =========================
+ TEST COMPILATION SECTION
+ =========================
+ -->
+
-
-
+
+
+
+
+
-
+
-
+
-
+ Must select some files in the IDE or set javac.includes
-
-
-
-
-
+
+
-
+
-
+
-
+ =======================
+ TEST EXECUTION SECTION
+ =======================
+ -->
+
-
-
+
+
-
- Some tests failed; see details above.
+
+ Some tests failed; see details above.
-
-
-
-
+
+
+
+
-
+ Must select some files in the IDE or set test.includes
-
+
+
+
+ Some tests failed; see details above.
-
- Some tests failed; see details above.
+
+
+ Must select some files in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
-
+
+ Some tests failed; see details above.
+
+
-
+ =======================
+ TEST DEBUGGING SECTION
+ =======================
+ -->
+ Must select one file in the IDE or set test.class
-
-
-
-
-
+
-
-
+
+ Must select one file in the IDE or set test.class
+ Must select some method in the IDE or set test.method
+
-
-
+
+
+
+
+
+
-
+
-
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ Must select one file in the IDE or set applet.url
@@ -510,11 +1354,11 @@
-
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ Must select one file in the IDE or set applet.url
@@ -522,20 +1366,54 @@
-
+
-
-
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -Nru libjna-java-4.2.2/contrib/platform/nbproject/project.properties libjna-java-4.4.0/contrib/platform/nbproject/project.properties
--- libjna-java-4.2.2/contrib/platform/nbproject/project.properties 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/nbproject/project.properties 2017-03-14 19:31:03.000000000 +0000
@@ -67,3 +67,5 @@
${build.test.classes.dir}
src.dir=src
test.src.dir=test
+source.encoding=UTF-8
+file.encoding=UTF-8
\ No newline at end of file
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/DesktopWindow.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/DesktopWindow.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/DesktopWindow.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/DesktopWindow.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,76 +1,88 @@
-/*
- * Copyright (c) 2015 Andreas "PAX" L\u00FCck, All Rights Reserved
- *
- * This library is free software; you can
- * redistribute it and/or modify it under the terms of the GNU Lesser
- * General Public License as published by the Free Software Foundation;
- * either version 2.1 of the License, or (at your option) any later
- * version. This library is distributed in the hope that it will be
- * useful, but WITHOUT ANY WARRANTY; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- */
-package com.sun.jna.platform;
-
-import java.awt.Rectangle;
-
-import com.sun.jna.platform.win32.WinDef.HWND;
-
-/**
- * Holds some general information about a window.
- *
- * @author Andreas "PAX" Lück, onkelpax-git[at]yahoo.de
- */
-public class DesktopWindow {
- private HWND hwnd;
- private String title;
- private String filePath;
- private Rectangle locAndSize;
-
- /**
- * @param hwnd
- * The associated window handle for this window.
- * @param title
- * The title text of the window.
- * @param filePath
- * The full file path to the main process that created the
- * window.
- * @param locAndSize
- * The window's location on screen and its dimensions.
- */
- public DesktopWindow(final HWND hwnd, final String title,
- final String filePath, final Rectangle locAndSize) {
- this.hwnd = hwnd;
- this.title = title;
- this.filePath = filePath;
- this.locAndSize = locAndSize;
- }
-
- /**
- * @return The associated window handle for this window.
- */
- public HWND getHWND() {
- return hwnd;
- }
-
- /**
- * @return The title text of the window.
- */
- public String getTitle() {
- return title;
- }
-
- /**
- * @return The full file path to the main process that created the window.
- */
- public String getFilePath() {
- return filePath;
- }
-
- /**
- * @return The window's location on screen and its dimensions.
- */
- public Rectangle getLocAndSize() {
- return locAndSize;
- }
-}
+/*
+ * Copyright (c) 2015 Andreas "PAX" L\u00FCck, All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
+ */
+package com.sun.jna.platform;
+
+import java.awt.Rectangle;
+
+import com.sun.jna.platform.win32.WinDef.HWND;
+
+/**
+ * Holds some general information about a window.
+ *
+ * @author Andreas "PAX" Lück, onkelpax-git[at]yahoo.de
+ */
+public class DesktopWindow {
+ private HWND hwnd;
+ private String title;
+ private String filePath;
+ private Rectangle locAndSize;
+
+ /**
+ * @param hwnd
+ * The associated window handle for this window.
+ * @param title
+ * The title text of the window.
+ * @param filePath
+ * The full file path to the main process that created the
+ * window.
+ * @param locAndSize
+ * The window's location on screen and its dimensions.
+ */
+ public DesktopWindow(final HWND hwnd, final String title,
+ final String filePath, final Rectangle locAndSize) {
+ this.hwnd = hwnd;
+ this.title = title;
+ this.filePath = filePath;
+ this.locAndSize = locAndSize;
+ }
+
+ /**
+ * @return The associated window handle for this window.
+ */
+ public HWND getHWND() {
+ return hwnd;
+ }
+
+ /**
+ * @return The title text of the window.
+ */
+ public String getTitle() {
+ return title;
+ }
+
+ /**
+ * @return The full file path to the main process that created the window.
+ */
+ public String getFilePath() {
+ return filePath;
+ }
+
+ /**
+ * @return The window's location on screen and its dimensions.
+ */
+ public Rectangle getLocAndSize() {
+ return locAndSize;
+ }
+}
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/DragHandler.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/DragHandler.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/DragHandler.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/DragHandler.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.dnd;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/DropHandler.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/DropHandler.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/DropHandler.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/DropHandler.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.dnd;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/DropTargetPainter.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/DropTargetPainter.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/DropTargetPainter.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/DropTargetPainter.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.dnd;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.dnd;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/EnumConverter.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/EnumConverter.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/EnumConverter.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/EnumConverter.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,17 +1,26 @@
/*
* Copyright 2014 Martin Steiger
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/EnumUtils.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/EnumUtils.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/EnumUtils.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/EnumUtils.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,17 +1,26 @@
/*
* Copyright 2014 Martin Steiger
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/FileMonitor.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/FileMonitor.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/FileMonitor.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/FileMonitor.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform;
@@ -79,7 +90,7 @@
}
public void addWatch(File dir, int mask, boolean recursive) throws IOException {
- watched.put(dir, new Integer(mask));
+ watched.put(dir, Integer.valueOf(mask));
watch(dir, mask, recursive);
}
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/FileUtils.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/FileUtils.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/FileUtils.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/FileUtils.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/KeyboardUtils.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/KeyboardUtils.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/KeyboardUtils.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/KeyboardUtils.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/Carbon.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/Carbon.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/Carbon.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/Carbon.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,24 +1,31 @@
/*
* Copyright (c) 2011 Denis Tulskiy
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with this work. If not, see .
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.mac;
import java.nio.IntBuffer;
-import java.util.Arrays;
import java.util.List;
import com.sun.jna.Library;
@@ -33,58 +40,68 @@
* Date: 7/25/11
*/
public interface Carbon extends Library {
- public static Carbon INSTANCE = (Carbon) Native.loadLibrary("Carbon", Carbon.class);
+ Carbon INSTANCE = Native.loadLibrary("Carbon", Carbon.class);
- public static final int cmdKey = 0x0100;
- public static final int shiftKey = 0x0200;
- public static final int optionKey = 0x0800;
- public static final int controlKey = 0x1000;
+ int cmdKey = 0x0100;
+ int shiftKey = 0x0200;
+ int optionKey = 0x0800;
+ int controlKey = 0x1000;
/**
* Obtains the event target reference for the standard toolbox dispatcher
* @return event dispatcher reference
*/
- public Pointer GetEventDispatcherTarget();
+ Pointer GetEventDispatcherTarget();
/**
* Installs an event handler on a specified event target.
*/
- public int InstallEventHandler(Pointer inTarget, EventHandlerProcPtr inHandler, int inNumTypes, EventTypeSpec[] inList, Pointer inUserData, PointerByReference outRef);
+ int InstallEventHandler(Pointer inTarget, EventHandlerProcPtr inHandler, int inNumTypes, EventTypeSpec[] inList, Pointer inUserData, PointerByReference outRef);
/**
* Registers a global hot key.
*/
- public int RegisterEventHotKey(int inHotKeyCode, int inHotKeyModifiers, EventHotKeyID.ByValue inHotKeyID, Pointer inTarget, int inOptions, PointerByReference outRef);
+ int RegisterEventHotKey(int inHotKeyCode, int inHotKeyModifiers, EventHotKeyID.ByValue inHotKeyID, Pointer inTarget, int inOptions, PointerByReference outRef);
/**
* Obtains a parameter from the specified event.
*/
- public int GetEventParameter(Pointer inEvent, int inName, int inDesiredType, Pointer outActualType, int inBufferSize, IntBuffer outActualSize, EventHotKeyID outData);
+ int GetEventParameter(Pointer inEvent, int inName, int inDesiredType, Pointer outActualType, int inBufferSize, IntBuffer outActualSize, EventHotKeyID outData);
/**
* Removes the specified event handler
*/
- public int RemoveEventHandler(Pointer inHandlerRef);
+ int RemoveEventHandler(Pointer inHandlerRef);
/**
* Unregisters a global hot key.
*/
- public int UnregisterEventHotKey(Pointer inHotKey);
+ int UnregisterEventHotKey(Pointer inHotKey);
public class EventTypeSpec extends Structure {
+ public static final List FIELDS = createFieldsOrder("eventClass", "eventKind");
+
public int eventClass;
public int eventKind;
- protected List getFieldOrder() {
- return Arrays.asList(new String[] { "eventClass", "eventKind" }); }
+
+ @Override
+ protected List getFieldOrder() {
+ return FIELDS;
+ }
}
public static class EventHotKeyID extends Structure {
+ public static final List FIELDS = createFieldsOrder("signature", "id");
+
public int signature;
public int id;
public static class ByValue extends EventHotKeyID implements Structure.ByValue { }
- protected List getFieldOrder() {
- return Arrays.asList(new String[] { "signature", "id" }); }
+
+ @Override
+ protected List getFieldOrder() {
+ return FIELDS;
+ }
}
public static interface EventHandlerProcPtr extends Callback {
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/MacFileUtils.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/MacFileUtils.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/MacFileUtils.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/MacFileUtils.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,26 +1,35 @@
/* Copyright (c) 2007-2013 Timothy Wall, All Rights Reserved
+ *
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.mac;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import com.sun.jna.Library;
import com.sun.jna.Native;
-import com.sun.jna.Pointer;
import com.sun.jna.Structure;
import com.sun.jna.ptr.PointerByReference;
import com.sun.jna.ptr.ByteByReference;
@@ -28,11 +37,12 @@
public class MacFileUtils extends FileUtils {
+ @Override
public boolean hasTrash() { return true; }
public interface FileManager extends Library {
- public FileManager INSTANCE = (FileManager)Native.loadLibrary("CoreServices", FileManager.class);
+ FileManager INSTANCE = Native.loadLibrary("CoreServices", FileManager.class);
int kFSFileOperationDefaultOptions = 0;
int kFSFileOperationsOverwrite = 0x01;
@@ -44,12 +54,17 @@
int kFSPathMakeRefDoNotFollowLeafSymlink = 0x01;
class FSRef extends Structure {
+ public static final List FIELDS = createFieldsOrder("hidden");
public byte[] hidden = new byte[80];
- protected List getFieldOrder() { return Arrays.asList(new String[] { "hidden" }); }
+
+ @Override
+ protected List getFieldOrder() {
+ return FIELDS;
+ }
}
// Deprecated; use trashItemAtURL instead:
- // https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NSFileManager/trashItemAtURL:resultingItemURL:error:
+ // https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/Reference/Reference.html#//apple_ref/occ/instm/NSFileManager/trashItemAtURL:resultingItemURL:error:
int FSRefMakePath(FSRef fsref, byte[] path, int maxPathSize);
int FSPathMakeRef(String source, int options, ByteByReference isDirectory);
int FSPathMakeRefWithOptions(String source, int options, FSRef fsref, ByteByReference isDirectory);
@@ -57,6 +72,7 @@
int FSMoveObjectToTrashSync(FSRef source, FSRef target, int options);
}
+ @Override
public void moveToTrash(File[] files) throws IOException {
File home = new File(System.getProperty("user.home"));
File trash = new File(home, ".Trash");
@@ -67,7 +83,7 @@
for (int i=0;i < files.length;i++) {
File src = files[i];
FileManager.FSRef fsref = new FileManager.FSRef();
- int status = FileManager.INSTANCE.FSPathMakeRefWithOptions(src.getAbsolutePath(),
+ int status = FileManager.INSTANCE.FSPathMakeRefWithOptions(src.getAbsolutePath(),
FileManager.kFSPathMakeRefDoNotFollowLeafSymlink,
fsref, null);
if (status != 0) {
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/SystemB.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/SystemB.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/SystemB.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/SystemB.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,23 +1,30 @@
/*
- * Copyright (c) 2015 Daniel Widdis
+ * Copyright (c) 2015 Daniel Widdis
*
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with this work. If not, see .
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.mac;
-import java.util.Arrays;
import java.util.List;
import com.sun.jna.Library;
@@ -33,50 +40,59 @@
*/
public interface SystemB extends Library {
- public static SystemB INSTANCE = (SystemB) Native.loadLibrary("System",
- SystemB.class);
+ SystemB INSTANCE = Native.loadLibrary("System", SystemB.class);
// host_statistics()
- static int HOST_LOAD_INFO = 1;// System loading stats
- static int HOST_VM_INFO = 2; // Virtual memory stats
- static int HOST_CPU_LOAD_INFO = 3;// CPU load stats
+ int HOST_LOAD_INFO = 1;// System loading stats
+ int HOST_VM_INFO = 2; // Virtual memory stats
+ int HOST_CPU_LOAD_INFO = 3;// CPU load stats
// host_statistics64()
- static int HOST_VM_INFO64 = 4; // 64-bit virtual memory stats
+ int HOST_VM_INFO64 = 4; // 64-bit virtual memory stats
// host_cpu_load_info()
- static int CPU_STATE_MAX = 4;
- static int CPU_STATE_USER = 0;
- static int CPU_STATE_SYSTEM = 1;
- static int CPU_STATE_IDLE = 2;
- static int CPU_STATE_NICE = 3;
+ int CPU_STATE_MAX = 4;
+ int CPU_STATE_USER = 0;
+ int CPU_STATE_SYSTEM = 1;
+ int CPU_STATE_IDLE = 2;
+ int CPU_STATE_NICE = 3;
// host_processor_info() flavor
- static int PROCESSOR_BASIC_INFO = 1;
- static int PROCESSOR_CPU_LOAD_INFO = 2;
+ int PROCESSOR_BASIC_INFO = 1;
+ int PROCESSOR_CPU_LOAD_INFO = 2;
// Data size
- static int UINT64_SIZE = Native.getNativeSize(long.class);
- static int INT_SIZE = Native.getNativeSize(int.class);
+ int UINT64_SIZE = Native.getNativeSize(long.class);
+ int INT_SIZE = Native.getNativeSize(int.class);
public static class HostCpuLoadInfo extends Structure {
+ public static final List FIELDS = createFieldsOrder("cpu_ticks");
public int cpu_ticks[] = new int[CPU_STATE_MAX];
-
+
+ @Override
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "cpu_ticks" });
+ return FIELDS;
}
}
public static class HostLoadInfo extends Structure {
+ public static final List FIELDS = createFieldsOrder("avenrun", "mach_factor");
public int[] avenrun = new int[3]; // scaled by LOAD_SCALE
public int[] mach_factor = new int[3]; // scaled by LOAD_SCALE
-
+
+ @Override
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "avenrun", "mach_factor" });
+ return FIELDS;
}
}
public static class VMStatistics extends Structure {
+ public static final List FIELDS = createFieldsOrder("free_count", "active_count",
+ "inactive_count", "wire_count", "zero_fill_count",
+ "reactivations", "pageins", "pageouts", "faults",
+ "cow_faults", "lookups", "hits", "purgeable_count",
+ "purges", "speculative_count");
+
public int free_count; // # of pages free
public int active_count; // # of pages active
public int inactive_count; // # of pages inactive
@@ -94,16 +110,27 @@
// # of pages speculative (included in free_count)
public int speculative_count;
+ @Override
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "free_count", "active_count",
- "inactive_count", "wire_count", "zero_fill_count",
- "reactivations", "pageins", "pageouts", "faults",
- "cow_faults", "lookups", "hits", "purgeable_count",
- "purges", "speculative_count" });
+ return FIELDS;
}
}
public static class VMStatistics64 extends Structure {
+ public static final List FIELDS = createFieldsOrder("free_count", "active_count",
+ "inactive_count", "wire_count",
+ "zero_fill_count", "reactivations",
+ "pageins", "pageouts",
+ "faults", "cow_faults",
+ "lookups", "hits",
+ "purges",
+ "purgeable_count", "speculative_count",
+ "decompressions", "compressions",
+ "swapins", "swapouts",
+ "compressor_page_count", "throttled_count",
+ "external_page_count", "internal_page_count",
+ "total_uncompressed_pages_in_compressor");
+
public int free_count; // # of pages free
public int active_count; // # of pages active
public int inactive_count; // # of pages inactive
@@ -137,19 +164,7 @@
@Override
protected List getFieldOrder() {
- return Arrays.asList(new String[] { "free_count", "active_count",
- "inactive_count", "wire_count",
- "zero_fill_count", "reactivations",
- "pageins", "pageouts",
- "faults", "cow_faults",
- "lookups", "hits",
- "purges",
- "purgeable_count", "speculative_count",
- "decompressions", "compressions",
- "swapins", "swapouts",
- "compressor_page_count", "throttled_count",
- "external_page_count", "internal_page_count",
- "total_uncompressed_pages_in_compressor" });
+ return FIELDS;
}
}
@@ -157,14 +172,23 @@
* The mach_host_self system call returns the calling thread's host name
* port. It has an effect equivalent to receiving a send right for the host
* port.
- *
+ *
* @return the host's name port
*/
int mach_host_self();
+
+ /**
+ * The mach_task_self system call returns the calling thread's task_self
+ * port. It has an effect equivalent to receiving a send right for the task's
+ * kernel port.
+ *
+ * @return the task's kernel port
+ */
+ int mach_task_self();
/**
* The host_page_size function returns the page size for the given host.
- *
+ *
* @param machPort
* The name (or control) port for the host for which the page
* size is desired.
@@ -177,7 +201,7 @@
/**
* The host_statistics function returns scheduling and virtual memory
* statistics concerning the host as specified by hostStat.
- *
+ *
* @param machPort
* The control port for the host for which information is to be
* obtained.
@@ -191,13 +215,12 @@
* returned (in natural-sized units).
* @return 0 on success; sets errno on failure
*/
- int host_statistics(int machPort, int hostStat, Structure stats,
- IntByReference count);
+ int host_statistics(int machPort, int hostStat, Structure stats, IntByReference count);
/**
* The host_statistics64 function returns 64-bit virtual memory statistics
* concerning the host as specified by hostStat.
- *
+ *
* @param machPort
* The control port for the host for which information is to be
* obtained.
@@ -210,17 +233,16 @@
* returned (in natural-sized units).
* @return 0 on success; sets errno on failure
*/
- int host_statistics64(int machPort, int hostStat, Structure stats,
- IntByReference count);
+ int host_statistics64(int machPort, int hostStat, Structure stats, IntByReference count);
/**
* The sysctl() function retrieves system information and allows processes
* with appropriate privileges to set system information. The information
* available from sysctl() consists of integers, strings, and tables.
- *
+ *
* The state is described using a "Management Information Base" (MIB) style
* name, listed in name, which is a namelen length array of integers.
- *
+ *
* The information is copied into the buffer specified by oldp. The size of
* the buffer is given by the location specified by oldlenp before the call,
* and that location gives the amount of data copied after a successful call
@@ -229,18 +251,18 @@
* call supplies as much data as fits in the buffer provided and returns
* with the error code ENOMEM. If the old value is not desired, oldp and
* oldlenp should be set to NULL.
- *
+ *
* The size of the available data can be determined by calling sysctl() with
* the NULL argument for oldp. The size of the available data will be
* returned in the location pointed to by oldlenp. For some operations, the
* amount of space may change often. For these operations, the system
* attempts to round up so that the returned size is large enough for a call
* to return the data shortly thereafter.
- *
+ *
* To set a new value, newp is set to point to a buffer of length newlen
* from which the requested value is to be taken. If a new value is not to
* be set, newp should be set to NULL and newlen set to 0.
- *
+ *
* @param name
* MIB array of integers
* @param namelen
@@ -262,7 +284,7 @@
* The sysctlbyname() function accepts an ASCII representation of the name
* and internally looks up the integer name vector. Apart from that, it
* behaves the same as the standard sysctl() function.
- *
+ *
* @param name
* ASCII representation of the MIB name
* @param oldp
@@ -290,15 +312,15 @@
* to repeatedly request the same variable (the sysctl() function runs in
* about a third the time as the same request made via the sysctlbyname()
* function).
- *
+ *
* The number of elements in the mib array can be determined by calling
* sysctlnametomib() with the NULL argument for mibp.
- *
+ *
* The sysctlnametomib() function is also useful for fetching mib prefixes.
* If size on input is greater than the number of elements written, the
* array still contains the additional elements which may be written
* programmatically.
- *
+ *
* @param name
* ASCII representation of the name
* @param mibp
@@ -309,10 +331,10 @@
* @return 0 on success; sets errno on failure
*/
int sysctlnametomib(String name, Pointer mibp, IntByReference size);
-
+
/**
* The host_processor_info function returns information about processors.
- *
+ *
* @param machPort
* The control port for the host for which information is to be
* obtained.
@@ -328,4 +350,20 @@
*/
int host_processor_info(int machPort, int flavor, IntByReference procCount,
PointerByReference procInfo, IntByReference procInfoCount);
+
+ /**
+ * The getloadavg() function returns the number of processes in the system
+ * run queue averaged over various periods of time. Up to nelem samples are
+ * retrieved and assigned to successive elements of loadavg[]. The system
+ * imposes a maximum of 3 samples, representing averages over the last 1, 5,
+ * and 15 minutes, respectively.
+ * @param loadavg
+ * An array of doubles which will be filled with the results
+ * @param nelem
+ * Number of samples to return
+ * @return If the load average was unobtainable, -1 is returned; otherwise,
+ * the number of samples actually retrieved is returned.
+ * @see getloadavg(3)
+ */
+ int getloadavg(double[] loadavg, int nelem);
}
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/XAttr.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttr.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/XAttr.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttr.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2014 Reinhard Pointner, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.mac;
@@ -23,7 +34,7 @@
interface XAttr extends Library {
// load from current image
- XAttr INSTANCE = (XAttr) Native.loadLibrary(null, XAttr.class);
+ XAttr INSTANCE = Native.loadLibrary(null, XAttr.class);
// see /usr/include/sys/xattr.h
int XATTR_NOFOLLOW = 0x0001;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/mac/XAttrUtil.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,14 +1,25 @@
/* Copyright (c) 2014 Reinhard Pointner, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform.mac;
diff -Nru libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/RasterRangesUtils.java libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/RasterRangesUtils.java
--- libjna-java-4.2.2/contrib/platform/src/com/sun/jna/platform/RasterRangesUtils.java 2016-03-16 14:37:28.000000000 +0000
+++ libjna-java-4.4.0/contrib/platform/src/com/sun/jna/platform/RasterRangesUtils.java 2017-03-14 19:31:03.000000000 +0000
@@ -1,15 +1,26 @@
/* Copyright (c) 2007 Olivier Chafik, All Rights Reserved
* Copyright (c) 2008 Timothy Wall, All Rights Reserved
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
+ * The contents of this file is dual-licensed under 2
+ * alternative Open Source/Free licenses: LGPL 2.1 or later and
+ * Apache License 2.0. (starting with JNA version 4.0.0).
+ *
+ * You can freely decide which license you want to apply to
+ * the project.
+ *
+ * You may obtain a copy of the LGPL License at:
+ *
+ * http://www.gnu.org/licenses/licenses.html
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "LGPL2.1".
+ *
+ * You may obtain a copy of the Apache License at:
+ *
+ * http://www.apache.org/licenses/
+ *
+ * A copy is also included in the downloadable source code package
+ * containing JNA, in file "AL2.0".
*/
package com.sun.jna.platform;
@@ -30,7 +41,7 @@
/**
* Methods that are useful to decompose a raster into a set of rectangles.
- * An occupied pixel has two possible meanings, depending on the raster :
+ * An occupied pixel has two possible meanings, depending on the raster :
*
*
if the raster has an alpha layer, occupied means with alpha not null
*
if the raster doesn't have any alpha layer, occupied means not completely black
@@ -45,6 +56,7 @@
};
private static final Comparator