From 45f9603a3e0392cbcd2bf14737d3cbdaea8c88fd Mon Sep 17 00:00:00 2001
From: troggan <>
Date: Sun, 17 Oct 2004 18:36:41 +0000
Subject: [PATCH] Initial commit
---
jacob/JacobComLifetime.html | 51 +
jacob/JacobThreading.html | 410 +++
jacob/LICENSE.TXT | 29 +
jacob/META-INF/MANIFEST.MF | 897 ++++++
jacob/README.TXT | 28 +
jacob/WhatsNew.html | 114 +
jacob/com/jacob/activeX/ActiveXComponent.java | 73 +
jacob/com/jacob/com/ComException.java | 88 +
jacob/com/jacob/com/ComFailException.java | 65 +
jacob/com/jacob/com/ComThread.java | 130 +
jacob/com/jacob/com/Dispatch.java | 546 ++++
jacob/com/jacob/com/DispatchEvents.java | 64 +
jacob/com/jacob/com/DispatchProxy.java | 65 +
jacob/com/jacob/com/EnumVariant.java | 122 +
jacob/com/jacob/com/JacobObject.java | 46 +
jacob/com/jacob/com/MainSTA.java | 43 +
jacob/com/jacob/com/ROT.java | 99 +
jacob/com/jacob/com/STA.java | 98 +
jacob/com/jacob/com/SafeArray.java | 247 ++
jacob/com/jacob/com/Variant.java | 368 +++
jacob/com/jacob/com/WrongThreadException.java | 37 +
jacob/jacob.dll | Bin 0 -> 94208 bytes
jacob/jacob.jar | Bin 0 -> 17173 bytes
jacob/jni/ComThread.cpp | 57 +
jacob/jni/ComThread.h | 30 +
jacob/jni/Dispatch.cpp | 422 +++
jacob/jni/Dispatch.h | 53 +
jacob/jni/DispatchEvents.cpp | 311 +++
jacob/jni/DispatchEvents.h | 39 +
jacob/jni/DispatchProxy.cpp | 116 +
jacob/jni/DispatchProxy.h | 37 +
jacob/jni/EnumVariant.cpp | 137 +
jacob/jni/EnumVariant.h | 46 +
jacob/jni/EventProxy.cpp | 163 ++
jacob/jni/EventProxy.h | 107 +
jacob/jni/README.txt | 17 +
jacob/jni/STA.cpp | 73 +
jacob/jni/STA.h | 29 +
jacob/jni/SafeArray.cpp | 2438 +++++++++++++++++
jacob/jni/SafeArray.h | 693 +++++
jacob/jni/StdAfx.cpp | 41 +
jacob/jni/StdAfx.h | 32 +
jacob/jni/Variant.cpp | 1145 ++++++++
jacob/jni/Variant.h | 613 +++++
jacob/jni/jacob.dll | Bin 0 -> 94208 bytes
jacob/jni/jacob.exp | Bin 0 -> 36752 bytes
jacob/jni/jacob.lib | Bin 0 -> 61978 bytes
jacob/jni/makefile | 51 +
jacob/jni/util.cpp | 69 +
jacob/jni/util.h | 8 +
jacob/makefile | 18 +
jacob/samples/README.txt | 8 +
jacob/samples/ado/ADO_README.txt | 88 +
jacob/samples/ado/Command.java | 120 +
jacob/samples/ado/CommandTypeEnum.java | 12 +
jacob/samples/ado/Connection.java | 180 ++
jacob/samples/ado/Field.java | 124 +
jacob/samples/ado/Fields.java | 50 +
jacob/samples/ado/Recordset.java | 411 +++
jacob/samples/ado/ms/README | 3 +
jacob/samples/ado/ms/testms.java | 64 +
jacob/samples/ado/test.java | 62 +
jacob/samples/applet/AppTest.html | 8 +
jacob/samples/applet/AppTest.java | 37 +
jacob/samples/servlet/JacobScript.java | 73 +
jacob/samples/servlet/readme.txt | 44 +
jacob/samples/test/Access.java | 89 +
jacob/samples/test/DispatchTest.java | 40 +
jacob/samples/test/IETest.java | 115 +
jacob/samples/test/MathProj/Math.cls | 37 +
jacob/samples/test/MathProj/MathTest.dll | Bin 0 -> 24576 bytes
jacob/samples/test/MathProj/MathTest.exp | Bin 0 -> 988 bytes
jacob/samples/test/MathProj/MathTest.lib | Bin 0 -> 2616 bytes
jacob/samples/test/MathProj/MathTest.vbp | 35 +
jacob/samples/test/MathProj/MathTest.vbw | 1 +
jacob/samples/test/MathProj/README | 1 +
jacob/samples/test/Outlook.java | 69 +
jacob/samples/test/ScriptTest.bat | 2 +
jacob/samples/test/ScriptTest.java | 57 +
jacob/samples/test/ScriptTest2.java | 98 +
jacob/samples/test/ScriptTest3.java | 68 +
jacob/samples/test/atl/MultiFace.java | 32 +
jacob/samples/test/atl/MultiFace/Face.cpp | 67 +
jacob/samples/test/atl/MultiFace/Face.h | 63 +
jacob/samples/test/atl/MultiFace/Face.rgs | 23 +
.../samples/test/atl/MultiFace/MultiFace.aps | Bin 0 -> 3584 bytes
.../samples/test/atl/MultiFace/MultiFace.cpp | 72 +
.../samples/test/atl/MultiFace/MultiFace.def | 9 +
.../samples/test/atl/MultiFace/MultiFace.dsp | 323 +++
.../samples/test/atl/MultiFace/MultiFace.dsw | 29 +
jacob/samples/test/atl/MultiFace/MultiFace.h | 571 ++++
.../samples/test/atl/MultiFace/MultiFace.idl | 70 +
.../samples/test/atl/MultiFace/MultiFace.ncb | Bin 0 -> 58368 bytes
.../samples/test/atl/MultiFace/MultiFace.opt | Bin 0 -> 53760 bytes
.../samples/test/atl/MultiFace/MultiFace.plg | 48 +
jacob/samples/test/atl/MultiFace/MultiFace.rc | 125 +
.../samples/test/atl/MultiFace/MultiFace.tlb | Bin 0 -> 2424 bytes
.../samples/test/atl/MultiFace/MultiFace_i.c | 56 +
.../samples/test/atl/MultiFace/MultiFace_p.c | 570 ++++
.../test/atl/MultiFace/MultiFaceps.def | 11 +
.../samples/test/atl/MultiFace/MultiFaceps.mk | 16 +
jacob/samples/test/atl/MultiFace/StdAfx.cpp | 12 +
jacob/samples/test/atl/MultiFace/StdAfx.h | 27 +
jacob/samples/test/atl/MultiFace/dlldata.c | 38 +
jacob/samples/test/atl/MultiFace/resource.h | 18 +
jacob/samples/test/atl/readme.txt | 14 +
jacob/samples/test/foo.foo | Bin 0 -> 80 bytes
jacob/samples/test/foo.ser | Bin 0 -> 147 bytes
jacob/samples/test/jacobtest.xls | Bin 0 -> 91136 bytes
jacob/samples/test/math.java | 38 +
jacob/samples/test/sa_dispatch.java | 41 +
jacob/samples/test/sa_test.java | 58 +
jacob/samples/test/safearray.java | 61 +
jacob/samples/test/sample2.mdb | Bin 0 -> 90112 bytes
jacob/samples/test/speed.java | 18 +
jacob/samples/test/test.java | 276 ++
jacob/samples/test/varSerTest.java | 50 +
jacob/samples/test/variant_test.java | 23 +
jacob/todo.txt | 1 +
jacob/vstudio/jacob/jacob.dsp | 190 ++
jacob/vstudio/jacob/jacob.dsw | 29 +
jacob/vstudio/jacob/jacob.ncb | Bin 0 -> 132096 bytes
jacob/vstudio/jacob/jacob.opt | Bin 0 -> 53760 bytes
jacob/vstudio/jacob/jacob.plg | 66 +
124 files changed, 15306 insertions(+)
create mode 100644 jacob/JacobComLifetime.html
create mode 100644 jacob/JacobThreading.html
create mode 100644 jacob/LICENSE.TXT
create mode 100644 jacob/META-INF/MANIFEST.MF
create mode 100644 jacob/README.TXT
create mode 100644 jacob/WhatsNew.html
create mode 100644 jacob/com/jacob/activeX/ActiveXComponent.java
create mode 100644 jacob/com/jacob/com/ComException.java
create mode 100644 jacob/com/jacob/com/ComFailException.java
create mode 100644 jacob/com/jacob/com/ComThread.java
create mode 100644 jacob/com/jacob/com/Dispatch.java
create mode 100644 jacob/com/jacob/com/DispatchEvents.java
create mode 100644 jacob/com/jacob/com/DispatchProxy.java
create mode 100644 jacob/com/jacob/com/EnumVariant.java
create mode 100644 jacob/com/jacob/com/JacobObject.java
create mode 100644 jacob/com/jacob/com/MainSTA.java
create mode 100644 jacob/com/jacob/com/ROT.java
create mode 100644 jacob/com/jacob/com/STA.java
create mode 100644 jacob/com/jacob/com/SafeArray.java
create mode 100644 jacob/com/jacob/com/Variant.java
create mode 100644 jacob/com/jacob/com/WrongThreadException.java
create mode 100644 jacob/jacob.dll
create mode 100644 jacob/jacob.jar
create mode 100644 jacob/jni/ComThread.cpp
create mode 100644 jacob/jni/ComThread.h
create mode 100644 jacob/jni/Dispatch.cpp
create mode 100644 jacob/jni/Dispatch.h
create mode 100644 jacob/jni/DispatchEvents.cpp
create mode 100644 jacob/jni/DispatchEvents.h
create mode 100644 jacob/jni/DispatchProxy.cpp
create mode 100644 jacob/jni/DispatchProxy.h
create mode 100644 jacob/jni/EnumVariant.cpp
create mode 100644 jacob/jni/EnumVariant.h
create mode 100644 jacob/jni/EventProxy.cpp
create mode 100644 jacob/jni/EventProxy.h
create mode 100644 jacob/jni/README.txt
create mode 100644 jacob/jni/STA.cpp
create mode 100644 jacob/jni/STA.h
create mode 100644 jacob/jni/SafeArray.cpp
create mode 100644 jacob/jni/SafeArray.h
create mode 100644 jacob/jni/StdAfx.cpp
create mode 100644 jacob/jni/StdAfx.h
create mode 100644 jacob/jni/Variant.cpp
create mode 100644 jacob/jni/Variant.h
create mode 100644 jacob/jni/jacob.dll
create mode 100644 jacob/jni/jacob.exp
create mode 100644 jacob/jni/jacob.lib
create mode 100644 jacob/jni/makefile
create mode 100644 jacob/jni/util.cpp
create mode 100644 jacob/jni/util.h
create mode 100644 jacob/makefile
create mode 100644 jacob/samples/README.txt
create mode 100644 jacob/samples/ado/ADO_README.txt
create mode 100644 jacob/samples/ado/Command.java
create mode 100644 jacob/samples/ado/CommandTypeEnum.java
create mode 100644 jacob/samples/ado/Connection.java
create mode 100644 jacob/samples/ado/Field.java
create mode 100644 jacob/samples/ado/Fields.java
create mode 100644 jacob/samples/ado/Recordset.java
create mode 100644 jacob/samples/ado/ms/README
create mode 100644 jacob/samples/ado/ms/testms.java
create mode 100644 jacob/samples/ado/test.java
create mode 100644 jacob/samples/applet/AppTest.html
create mode 100644 jacob/samples/applet/AppTest.java
create mode 100644 jacob/samples/servlet/JacobScript.java
create mode 100644 jacob/samples/servlet/readme.txt
create mode 100644 jacob/samples/test/Access.java
create mode 100644 jacob/samples/test/DispatchTest.java
create mode 100644 jacob/samples/test/IETest.java
create mode 100644 jacob/samples/test/MathProj/Math.cls
create mode 100644 jacob/samples/test/MathProj/MathTest.dll
create mode 100644 jacob/samples/test/MathProj/MathTest.exp
create mode 100644 jacob/samples/test/MathProj/MathTest.lib
create mode 100644 jacob/samples/test/MathProj/MathTest.vbp
create mode 100644 jacob/samples/test/MathProj/MathTest.vbw
create mode 100644 jacob/samples/test/MathProj/README
create mode 100644 jacob/samples/test/Outlook.java
create mode 100644 jacob/samples/test/ScriptTest.bat
create mode 100644 jacob/samples/test/ScriptTest.java
create mode 100644 jacob/samples/test/ScriptTest2.java
create mode 100644 jacob/samples/test/ScriptTest3.java
create mode 100644 jacob/samples/test/atl/MultiFace.java
create mode 100644 jacob/samples/test/atl/MultiFace/Face.cpp
create mode 100644 jacob/samples/test/atl/MultiFace/Face.h
create mode 100644 jacob/samples/test/atl/MultiFace/Face.rgs
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.aps
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.cpp
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.def
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.dsp
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.dsw
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.h
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.idl
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.ncb
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.opt
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.plg
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.rc
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace.tlb
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace_i.c
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFace_p.c
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFaceps.def
create mode 100644 jacob/samples/test/atl/MultiFace/MultiFaceps.mk
create mode 100644 jacob/samples/test/atl/MultiFace/StdAfx.cpp
create mode 100644 jacob/samples/test/atl/MultiFace/StdAfx.h
create mode 100644 jacob/samples/test/atl/MultiFace/dlldata.c
create mode 100644 jacob/samples/test/atl/MultiFace/resource.h
create mode 100644 jacob/samples/test/atl/readme.txt
create mode 100644 jacob/samples/test/foo.foo
create mode 100644 jacob/samples/test/foo.ser
create mode 100644 jacob/samples/test/jacobtest.xls
create mode 100644 jacob/samples/test/math.java
create mode 100644 jacob/samples/test/sa_dispatch.java
create mode 100644 jacob/samples/test/sa_test.java
create mode 100644 jacob/samples/test/safearray.java
create mode 100644 jacob/samples/test/sample2.mdb
create mode 100644 jacob/samples/test/speed.java
create mode 100644 jacob/samples/test/test.java
create mode 100644 jacob/samples/test/varSerTest.java
create mode 100644 jacob/samples/test/variant_test.java
create mode 100644 jacob/todo.txt
create mode 100644 jacob/vstudio/jacob/jacob.dsp
create mode 100644 jacob/vstudio/jacob/jacob.dsw
create mode 100644 jacob/vstudio/jacob/jacob.ncb
create mode 100644 jacob/vstudio/jacob/jacob.opt
create mode 100644 jacob/vstudio/jacob/jacob.plg
diff --git a/jacob/JacobComLifetime.html b/jacob/JacobComLifetime.html
new file mode 100644
index 0000000..7f1a3a7
--- /dev/null
+++ b/jacob/JacobComLifetime.html
@@ -0,0 +1,51 @@
+
COM Object Lifetime in JACOB
+
+
introduction
+
+JACOB Version 1.7 implements a new
+Threading Model that is more
+compatible with COM apartments. There is also an incompatibility
+between the Java object lifetime model and that of COM objects.
+COM Objects live and die by their reference count, whereas Java
+objects are collected by the Garbage Collector (GC) based on algortihms
+that are hidden from the user.
+
COM Object Lifetime in JACOB Prior to Version 1.7
+
+In version 1.6 and earlier, JACOB objects which wrapped COM objects
+had finalize()
methods that would call a native
+release
method which would call a COM Release
.
+
+This has many problems. For one thing, the GC may take a long time to
+kick in and resource consumption may grow. However, the more problematic
+issue is that finalizers are called from a separate thread, and, as was
+discussed in the Threading Model
+document, this can result in COM errors if the object is running in an
+STA. Even if the object is running in an MTA, the finalizer may decide
+to run after we have terminated the thread that holds the component, in
+which case we would get fatal errors and crashes.
+
COM Object Lifetime in JACOB in Version 1.7
+
+In Version 1.7, all JACOB objects which wrap COM objects extend
+com.jacob.com.JacobObject
. This object has some special
+code to register itself with a com.jacob.com.ROT
object
+which represents a Running Object Table (ROT). This table maps a
+Thread to the set of JacobObjects created in that thread. Therefore,
+when you call ComThread.Release()
, the ROT checks whether
+that thread has created any objects, and these objects are released
+by calling their native release
method (which is public).
+
+This lifetime management method ties the lifecycle to the thread's
+lifecycle rather than the GC. The JacobObject's still have finalizers,
+but they will typically not perform the native release
+since that has already been called. The native release
+methods were written such that you can call them multiple times without
+worrying - since they zero out the native pointer when called the first
+time.
+
+If you choose to call release
methods on your objects
+yourself, that is allowed. In that case, when the thread is released
+the release calls will be no-ops.
+
+It becomes important for you to call ComThread.Release()
+on any thread before you allow it to exit, otherwise you may get
+some random crashes later on in your code.
diff --git a/jacob/JacobThreading.html b/jacob/JacobThreading.html
new file mode 100644
index 0000000..7960551
--- /dev/null
+++ b/jacob/JacobThreading.html
@@ -0,0 +1,410 @@
+
COM Apartments in JACOB
+
+
introduction
+
+The COM model for Threading differs from the Java model.
+In COM, each component can declare whether or not it support
+multi-threading.
+
+You can find some basic information about COM threading at:
+
+
+http://www.execpc.com/~gopalan/com/com_threading.html
+
+
+www.microsoft.com/msj/0297/apartment/apartment.htm
+
+
+http://www.cswl.com/whiteppr/white/multithreading.html
+
+
+The term Single Threaded Apartment (STA) refers to a thread
+where all COM objects created in that thread are
+single-threaded. This can manifest itself in two ways:
+
+Either all calls into that component are made from the same thread
+that created the component
+
+OR any call that is made from another thread gets serialized by COM.
+This serialization of calls is done by using a Windows message loop and
+posting messages to a hidden window (I'm not kidding). The way COM
+achieves this is by requiring any other thread to make calls through
+a local Proxy object rather than the original object (more on this
+when we discuss the JACOB DispatchProxy class).
+
+What does this mean for a Java application? If you are using a component
+that declares itself as ThreadingModel "Apartment" (you can
+find this out by looking in the registry under its CLSID), and you plan
+to create, use and destroy this component in one thread - then you are
+following the rules of an STA and you can declare the thread as an
+STA thread.
+
+On the other hand, if you need to make method calls from another thread
+(e.g. in a servlet) then you have a few choices. Either you
+create the component in its own STA, by extending
+com.jacob.com.STA
, and use the
+com.jacob.com.DispatchProxy
class to pass the Dispatch
+pointer between threads, or you can declare your thread as an MTA
+thread. In that case, COM will make
+the cross-thread calls into the STA that is running your component.
+If you create an Apartment threaded component in the MTA,
+COM will automatically create an STA for you and put your
+component in there, and then marshall all the calls.
+
+This brings us to the notion of a Main STA. COM requires that
+if there is any Apartment threaded component in your application, then
+the first STA created is tagged as the Main STA. COM uses the
+Main STA to create all the Apartment threaded components that are
+created from an MTA thread. The problem is that if you have already
+created an STA, then COM will pick that as the Main STA, and if you
+ever exit that thread - the whole application will exit.
+
+
COM Threads in JACOB Prior to Version 1.7
+
+Up until version 1.7 of JACOB, there was only one model available
+in JACOB:
+
+-
+Before version 1.6: All threads were automatically initialized as STAs.
+
+-
+In version 1.6: All threads were automatically initialized as MTAs.
+
+
+
+The reason for the change in default was that tagging a Java thread
+as an STA can cause problems. Any Java Swing application, as well as
+servlets and applets need to be able to make calls from multiple
+threads. If you try to make COM method calls across STA threads - it
+will fail!
+
+In most cases, the default chosen by JACOB 1.6 (MTA) works fine, however
+there are some notable exceptions that have caused people grief. One
+such exception is in the case of MAPI. It turns out that if you try to
+create a MAPI object from an MTA thread - it simply fails and exits.
+This has caused some people to recompile JACOB 1.6 back with the STA
+default.
+
+There is another problem with MTA threads: when you are using Apartment
+threaded components, we already noted that COM will create the
+components in the Main STA. If one doesn't exist, COM will create it.
+However, this means that all Apartment threaded components will
+be created in the same STA. This creates a bottleneck, and a
+dependency between unrelated components. Also, if that STA exits, then
+all components are destroyed and the application will likely crash.
+
+
COM Threads in JACOB Version 1.7
+
+In Version 1.7 we have added finer grained control to allow the
+Java programmer to control how COM creates its components.
+Unfortunately, this means that you need to have a pretty good
+understanding of the dark and mystical subject of COM Apartments.
+There are a few different cases you need to consider:
+
Default
+
+If you simply run code that was created in Version 1.6 and ignore
+the COM threading issue, then you will get the same behavior as in 1.6:
+Each java thread will be an MTA thread, and all Apartment threaded
+components will be created by COM in its own Main STA. This typically
+works for most applications (exceptions noted above).
+
Create Your Own Apartment
+
+To declare an MTA thread use the following template:
+
+
+
+ComThread.InitMTA();
+...
+...
+ComThread.Release();
+
+
+
+If you want JACOB to create its own Main STA (rather than having COM
+choose an STA for you), then you should use:
+
+
+
+Thread 1:
+ComThread.InitMTA(true); // a true tells JACOB to create a Main STA
+...
+...
+ComThread.Release();
+...
+Thread 2:
+ComThread.InitMTA();
+...
+...
+ComThread.Release();
+...
+...
+ComThread.quitMainSTA();
+
+
+
+In this case, you can also create the Main STA explicitly:
+
+
+
+ComThread.startMainSTA();
+...
+...
+Thread 1:
+ComThread.InitMTA();
+...
+...
+ComThread.Release();
+...
+Thread 2:
+ComThread.InitMTA();
+...
+...
+ComThread.Release();
+...
+...
+ComThread.quitMainSTA();
+
+
+
+In the latter case, all Apartment threaded components will be created in
+JACOB's main STA. This still has all the problems of components
+sharing the same Main STA and creating a bottleneck. To avoid that,
+you can also create STA threads yourself:
+
+
+
+ComThread.startMainSTA();
+...
+...
+Thread 1:
+ComThread.InitSTA();
+...
+...
+ComThread.Release();
+...
+Thread 2:
+ComThread.InitMTA();
+...
+...
+ComThread.Release();
+...
+...
+ComThread.quitMainSTA();
+
+
+
+In this example, thread 1 is an STA and thread 2 is an MTA. You could
+omit the call to ComThread.startMainSTA(), but if you do, then COM will
+make the first STA your main one, and then if you exit that thread,
+the application will crash.
+
+Actually, Thread 1 is almost an STA. It's lacking a windows
+message loop. So, this type of STA is fine as long as you are creating
+a component and using it in the same thread, and not makind event
+callbacks.
+
JACOB's STA Class
+
+If you want to create an true STA where you can create a component and
+then let other threads call methods on it, then you need a windows
+message loop. JACOB provides a class called:
+com.jacob.com.STA
which does exactly this.
+
+
+public class com.jacob.com.STA extends java.lang.Thread
+{
+ public com.jacob.com.STA();
+ public boolean OnInit(); // you override this
+ public void OnQuit(); // you override this
+ public void quit(); // you can call this from ANY thread
+}
+
+
+
+The STA class extends
+java.lang.Thread
and it provides you with two methods
+that you can override: OnInit
and OnQuit
.
+These methods are called from the thread's run
method
+so they will execute in the new thread. These methods allow you to
+create COM components (Dispatch objects) and release them.
+To create an STA, you subclass it and override the OnInit.
+
+The quit
method is the only other method that
+can be called from any thread. This method uses the Win32 function
+PostThreadMessage
to force the STA's windows message loop
+to exit, thereby terminating the thread.
+
+You will then need to make calls into the component that is running
+in the STA thread. If you simply try to make calls from another thread
+on a Dispatch object created in the STA thread, you will get a COM
+Exception. For more details see:
+
+Don Box 'Effective COM' Rule 29: Don't Access raw
+interface pointers across apartment boundaries.
+
The DispatchProxy Class
+Since you cannot call methods directly on a Dispatch object created
+in another STA JACOB provides a method for the class that created
+the Dispatch object to marshal it to your thread. This is done via
+the com.jacob.com.DispatchProxy
class.
+
+
+public class DispatchProxy extends JacobObject {
+ public DispatchProxy(Dispatch);
+ public Dispatch toDispatch();
+
+ public native void release();
+ public void finalize();
+}
+
+
+
+This class works as follows: the thread that created the Dispatch
+object constructs an instance of DispatchProxy(Dispatch) with the
+Dispatch as a parameter. This instance can then be accessed from
+another thread, which will invoke its toDispatch
method
+proxy as if it were local to your thread. COM will do the inter-thread
+marshalling transparently.
+
+The following example is part of samples/test/ScriptTest2.java in the
+JACOB distribution. It shows how you can create the ScriptControl
+in one STA thread and make method calls on it from another:
+
+
+import com.jacob.com.*;
+import com.jacob.activeX.*;
+
+class ScriptTest2 extends STA
+{
+ public static ActiveXComponent sC;
+ public static Dispatch sControl = null;
+ public static DispatchProxy sCon = null;
+
+ public boolean OnInit()
+ {
+ try
+ {
+ System.out.println("OnInit");
+ System.out.println(Thread.currentThread());
+ String lang = "VBScript";
+
+ sC = new ActiveXComponent("ScriptControl");
+ sControl = (Dispatch)sC.getObject();
+
+ // sCon can be called from another thread
+ sCon = new DispatchProxy(sControl);
+
+ Dispatch.put(sControl, "Language", lang);
+ return true;
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ return false;
+ }
+ }
+
+ public void OnQuit()
+ {
+ System.out.println("OnQuit");
+ }
+
+ public static void main(String args[]) throws Exception
+ {
+ try {
+ ComThread.InitSTA();
+ ScriptTest2 script = new ScriptTest2();
+ Thread.sleep(1000);
+
+ // get a thread-local Dispatch from sCon
+ Dispatch sc = sCon.toDispatch();
+
+ // call a method on the thread-local Dispatch obtained
+ // from the DispatchProxy. If you try to make the same
+ // method call on the sControl object - you will get a
+ // ComException.
+ Variant result = Dispatch.call(sc, "Eval", args[0]);
+ System.out.println("eval("+args[0]+") = "+ result);
+ script.quit();
+ System.out.println("called quit");
+ } catch (ComException e) {
+ e.printStackTrace();
+ }
+ finally
+ {
+ ComThread.Release();
+ }
+ }
+}
+
+
+
+You can try to modify the Dispatch.call
invocation in
+the main thread to use sControl
directly, and you will see
+that it fails. Notice that once we construct the ScriptTest2 object
+in the main thread, we sleep for a second to allow the other thread
+time to initialize itself.
+
+The STA thread calls sCon = new DispatchProxy(sControl);
+to save a global reference to the DispatchProxy that represents the
+sControl
object. The main thread then calls:
+Dispatch sc = sCon.toDispatch();
to get a local Dispatch
+proxy out of the DispatchProxy object.
+
+At most one(!)
+thread can call toDispatch(), and the call can be made only once.
+This is because a IStream object is used to pass the proxy, and
+it is only written once and closed when you read it.
+If you need multiple threads to access a Dispatch pointer, then
+create that many DispatchProxy objects. For more details please
+refer to the Don Box reference above.
+
+
+
Recommended Procedure
+
+-
+It is recommended that you always allow JACOB to manage the main STA
+rather than letting COM create one on its own or tag one of yours.
+
+-
+Declare an STA thread using ComThread.InitSTA()
+if all your
+method calls for that component are going to come from the same thread.
+
+-
+If you want an STA thread that allows other threads to call into it,
+use the
com.jacob.com.STA
class as outlined above.
+
+-
+If you have a COM component that declares its ThreadingModel as
+"Free" or "Both", then use the MTA.
+
+-
+In most cases, if you need to make method calls from multiple threads,
+you can simply
+use MTA threads, and allow COM to create the components in
+the Main STA. You should only create your own STA's and DispatchProxy
+if you understand COM well enough to know when the MTA solution
+will fail or have other shortcomings.
+
+There are 3 examples in the samples/test directory that demonstrate
+these cases:
+
+ScriptTest.java - creates an STA for the ScriptControl component and
+runs all its method calls from that STA.
+
+ScriptTest2.java - creates a separate STA thread, and makes
+method calls into the component from another thread using DispatchProxy.
+
+ScriptTest3.java - creates a separate MTA thread, and makes method
+calls into the component from another MTA thread. This is simpler
+than ScriptTest2 for most applications.
+
+
Default Threading Model
+If you create a new thread, and don't call
+ComThread.InitSTA()
or ComThread.InitMTA()
+on it, then the first time your java code creates a JacobObject, it
+will try to register itself with the ROT, and when it sees that the
+current thread is not initialized, it will initialize it as MTA.
+This means that the code to do this is no longer inside the native
+jni code - it is now in the com.jacob.com.ROT
class.
+For more details on the ROT, see the
+Object Lifetime document.
diff --git a/jacob/LICENSE.TXT b/jacob/LICENSE.TXT
new file mode 100644
index 0000000..69a2eda
--- /dev/null
+++ b/jacob/LICENSE.TXT
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
diff --git a/jacob/META-INF/MANIFEST.MF b/jacob/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..90f14d9
--- /dev/null
+++ b/jacob/META-INF/MANIFEST.MF
@@ -0,0 +1,897 @@
+Manifest-Version: 1.0
+
+Name: ./com/jacob/activeX/ActiveXComponent.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: qqewKW8c2W7aSvB4Ob/bMbCPeFI=
+MD5-Digest: EZs0WpbDBV5Id5XRw2tbtg==
+
+Name: ./com/jacob/activeX/ActiveXComponent.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: IeJoOZ9U4LtHuqyqJGKG24nDTYw=
+MD5-Digest: Qqf2RAOc0xBTG8dGIyA2+w==
+
+Name: ./com/jacob/com/ComException.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: fuWzbhsBKLBjPtk5pvgVzskMFz4=
+MD5-Digest: vwLlwRM/J9NYONB/UVw1AA==
+
+Name: ./com/jacob/com/ComException.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: 9HsO+/DGzYdZtFDK+Yi6SyEo29I=
+MD5-Digest: tHiTxIfngQHjEXPzVC31pA==
+
+Name: ./com/jacob/com/ComFailException.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: dghV0kFmeXaebK73wRAyBNZsfeM=
+MD5-Digest: EmfTcOZd7lFdNX+ZZIGufA==
+
+Name: ./com/jacob/com/ComFailException.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: yIS8kOUyyl2ymTHxb/8Za4ktjsw=
+MD5-Digest: sdqsHsk9p4XXX5kfvQOQNg==
+
+Name: ./com/jacob/com/ComThread.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: J+KEmDJYSMA2VXg8smZpLFQYAuc=
+MD5-Digest: wnPiLbEgp7GC4sMVsQ1eWg==
+
+Name: ./com/jacob/com/ComThread.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: q0K2wuQ+be8Qrrai/Ui1BTMeFeo=
+MD5-Digest: eH6GkFkD3A3PrX1cZJWr6w==
+
+Name: ./com/jacob/com/Dispatch.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: tYSc84+VUMMWYt7hrLDtcnINNUI=
+MD5-Digest: etVQxCE1JEN1rYCc5ZA79A==
+
+Name: ./com/jacob/com/Dispatch.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: Q95eP1KW/Z/ICzzeaNDCFUIG408=
+MD5-Digest: IovIOD5G/XY7qFAHViNeng==
+
+Name: ./com/jacob/com/DispatchEvents.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 7cgrmVJc18T/hRvT3931tQzVa5s=
+MD5-Digest: CtihQf0ka9OChKX+OnKucQ==
+
+Name: ./com/jacob/com/DispatchEvents.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: 5MwAZmktJFp7rq23Lz/VG1/ULk4=
+MD5-Digest: 2haKHCBa7UXfl8HCSPEyQQ==
+
+Name: ./com/jacob/com/DispatchProxy.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: xDGCGyw+8G/kxFFOQtQo3rbhDN8=
+MD5-Digest: +5n2WPrM0Jj0FauyuctPMQ==
+
+Name: ./com/jacob/com/DispatchProxy.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: 4NGdFabt0CZL8y56A1x/AEat6/o=
+MD5-Digest: Wd9zhjmACcUxZ3gqdWtB2w==
+
+Name: ./com/jacob/com/EnumVariant.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: ft/EfZ1xwI/J07yz6oxla2jKZFM=
+MD5-Digest: zRYy+0tuDsAQ7SCOJxgx5A==
+
+Name: ./com/jacob/com/EnumVariant.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: 3biekksAd50gb6GRfpefO2PpS6c=
+MD5-Digest: zlu6oH2HFI//sGTexAv9GQ==
+
+Name: ./com/jacob/com/JacobObject.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 9uw+e0Wxha1A6tp6PFQE1JMJkvQ=
+MD5-Digest: D37EFI7kTv9NEnsyQcsXsA==
+
+Name: ./com/jacob/com/JacobObject.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: TqJDUM7Ujxt5/zAGSG9uCoKcJ4U=
+MD5-Digest: oD0tL8WPPCN3jF59jfd/yA==
+
+Name: ./com/jacob/com/MainSTA.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 3WKAHdSq2yTa/lqHgyOTo6vqvnk=
+MD5-Digest: h0kY/3xCUs0uCyhWUL+DWQ==
+
+Name: ./com/jacob/com/MainSTA.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: pDIgNuK9H9KhKQEZIMIgM44nDo8=
+MD5-Digest: p/CDI6V3KgdOViQQ6/oR0g==
+
+Name: ./com/jacob/com/ROT.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: bEQuGPBbOn8HlXMmcLQCRh0BlYs=
+MD5-Digest: rCXiBlficXaJbCoFMCeoJg==
+
+Name: ./com/jacob/com/ROT.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: K6WVkJuFZNjgow/o4/1pTyKu2Tk=
+MD5-Digest: eOCwqvCPVk+haZ7WFzEJOg==
+
+Name: ./com/jacob/com/SafeArray.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: AIqtFq0miAVrMUY0HZUnXuhl284=
+MD5-Digest: TiPLaOJAMTzTVP2a2AsX0A==
+
+Name: ./com/jacob/com/SafeArray.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: CGBlCL952tC//MTG+XxqSOQh/hI=
+MD5-Digest: pf25bH4uo0LZOzz7utDa8Q==
+
+Name: ./com/jacob/com/STA.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 6cqSEZm+8kVkAO4Vnc5G04qCrCE=
+MD5-Digest: 7O16Je2NaryCebJZ28U20A==
+
+Name: ./com/jacob/com/STA.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: S0EbhtSPEAv9fGOaTNBymxmZthM=
+MD5-Digest: 9fcj8YmMFCCfB8M5eF7lPA==
+
+Name: ./com/jacob/com/Variant.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: ea5nat308Pg7cxcJdywpqL++HiM=
+MD5-Digest: 6/TukZAwtC9UOUArjcpTXg==
+
+Name: ./com/jacob/com/Variant.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: psnbnw0M+2egeuqpbf2u1C7I/EY=
+MD5-Digest: iuuq5W1sFXeT269RJC7U6w==
+
+Name: ./com/jacob/com/WrongThreadException.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 55DxaZjMfzYE9MTCKZ8VPgpjVLc=
+MD5-Digest: 9uygPT4WdJg8N6Yo/t0tkA==
+
+Name: ./com/jacob/com/WrongThreadException.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: PPQzELKIkTeQJfGTBUfUonPdSnc=
+MD5-Digest: bNwuGE+cW1Z9+pWnI3r/Bg==
+
+Name: ./jacob.dll
+Digest-Algorithms: SHA MD5
+SHA-Digest: 3LlRg0frUqmTW8HjSXm2tGZi9og=
+MD5-Digest: MgUWKEmjKUX4hFTLoSyeCA==
+
+Name: ./jacob.jar
+Digest-Algorithms: SHA MD5
+SHA-Digest: xLY8bhITrVUd+Ft+++piDVNh+lc=
+MD5-Digest: 5MOSXL4nEeEAdO40bNd3oA==
+
+Name: ./JacobComLifetime.html
+Digest-Algorithms: SHA MD5
+SHA-Digest: uGRYLP2xhOaPGbunFQ7cxZcUvaw=
+MD5-Digest: 3RU8RW+2/liuGpkyYbTPHg==
+
+Name: ./jacobSrc_18.zip
+Digest-Algorithms: SHA MD5
+SHA-Digest: 2jmj7l5rSw0yVb/vlWAYkK/YBwk=
+MD5-Digest: 1B2M2Y8AsgTpgAmY7PhCfg==
+
+Name: ./JacobThreading.html
+Digest-Algorithms: SHA MD5
+SHA-Digest: IQs2MYpplp8guNE7nFWcnsEJLt8=
+MD5-Digest: MuRQ3uXcEMeB5msQ/oYyTQ==
+
+Name: ./jni/ComThread.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: pfEIKsR11Doq3+Dmwpyf6tscRCY=
+MD5-Digest: RDG15eEa+FxZtSmn1sadSg==
+
+Name: ./jni/ComThread.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: JtBBBpPcOqjBm4o10ui48TOgkps=
+MD5-Digest: z3ocf5BOusRSSdB8madNlA==
+
+Name: ./jni/ComThread.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: Z05DKyL+S6GI3w0GhhkoeWRS+Ss=
+MD5-Digest: wUSJQhroulYl2cZ+eLnu7Q==
+
+Name: ./jni/Dispatch.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: FH0YWD3RyD9CR1fHkGiIzJLh0tk=
+MD5-Digest: VAjOj5ZPrBCbqvd15um09w==
+
+Name: ./jni/Dispatch.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: N74Cx8buqtuTUkLbg604pgcRGmE=
+MD5-Digest: bX1snnEyrNBwexgVNtasCg==
+
+Name: ./jni/Dispatch.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: saxklkHmLIdMVLdKj4vmYRtBHVo=
+MD5-Digest: 0Y6c1VfYLJuQWlm6MI9UuA==
+
+Name: ./jni/DispatchEvents.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: UHLjKXAwbPlVN8hQoexl38jv1lM=
+MD5-Digest: lL07d5A5AIxqphOxetIiLg==
+
+Name: ./jni/DispatchEvents.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: VKWhIhXOim7LLhyLGJclVlkilfI=
+MD5-Digest: s4huR7K3gZu5qfQQTTRcGg==
+
+Name: ./jni/DispatchEvents.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: 0I3opm1/14UCERfLZqUkoAnqObI=
+MD5-Digest: Kd6mTsrifhRCmOT2rUkLHw==
+
+Name: ./jni/DispatchProxy.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: sEo5fo91hMQ0k+XVaZk5TCkC0NM=
+MD5-Digest: tsX0rWU+eL5pKaBRhANZIw==
+
+Name: ./jni/DispatchProxy.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: FCqZSwrPy5rOPWeiioNcxz9ooj8=
+MD5-Digest: IfhrIzu/elu0CFTU/+FH0A==
+
+Name: ./jni/DispatchProxy.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: yN/dtGG4um+SuuQrTo5+1uLSiiY=
+MD5-Digest: FTdU29Tt31Zr+v/uF+Exlg==
+
+Name: ./jni/EnumVariant.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: UqE3XEqyuSOqCey9y6NtgO56vlk=
+MD5-Digest: MjoER1irRaeyqAouQJLnaw==
+
+Name: ./jni/EnumVariant.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: rHJQr1J+8v4371BuFvhLifmyXRg=
+MD5-Digest: 0ShO6APjAlzrxpL1VHtp4Q==
+
+Name: ./jni/EnumVariant.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: SBD1O7LN4s4xoYdYX8HMutBkIno=
+MD5-Digest: q05v4Kbf3xXr6TTKFSJh+g==
+
+Name: ./jni/EventProxy.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: tQM4T5PxwKGiWIe7WAr7OUCZn88=
+MD5-Digest: xH3pvJqZW5utS9K2jPDkog==
+
+Name: ./jni/EventProxy.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: 25r17CcIBLdEIoHXKp65NyTmVQk=
+MD5-Digest: 2CpIIkRfJSfZQpkvpbBenQ==
+
+Name: ./jni/EventProxy.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: gShJkleKBewW8MrzUC0/XvRQWNw=
+MD5-Digest: zpim8NXVV7RfD/xk2mJW6w==
+
+Name: ./jni/jacob.dll
+Digest-Algorithms: SHA MD5
+SHA-Digest: 3LlRg0frUqmTW8HjSXm2tGZi9og=
+MD5-Digest: MgUWKEmjKUX4hFTLoSyeCA==
+
+Name: ./jni/jacob.exp
+Digest-Algorithms: SHA MD5
+SHA-Digest: 72e/gQTKiE1r9Uslz4vYRQ0PHmQ=
+MD5-Digest: 5mklGz6sCKSgVrjey6YL5g==
+
+Name: ./jni/jacob.lib
+Digest-Algorithms: SHA MD5
+SHA-Digest: m8ZbuTExo3Un0O7MWBc5o9WJ6g8=
+MD5-Digest: ybxMyVrwSNUnuhbGLQnYkw==
+
+Name: ./jni/makefile
+Digest-Algorithms: SHA MD5
+SHA-Digest: n/Ol9YQ2klBEFhF8C7gM37Q85go=
+MD5-Digest: 5gkJFwMCbAAZAEyb/OWKPw==
+
+Name: ./jni/README.txt
+Digest-Algorithms: SHA MD5
+SHA-Digest: lHYa7laejzkdRZkjyk5hh01Nh70=
+MD5-Digest: 6YannUlp3XpNr7bZP6i5Bg==
+
+Name: ./jni/SafeArray.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: +u64HvTcLPDEuGHsH7ydYMNmROI=
+MD5-Digest: 1C3cuqY05UZF4Kh28Vc3Bw==
+
+Name: ./jni/SafeArray.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: g5KEynNNTCV/0+TtLSrgtBGIVB8=
+MD5-Digest: W6TK/CsQYfRRrCsn1vlf8A==
+
+Name: ./jni/SafeArray.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: HcWyMrmnhyYxKsIO8GfrtEFgHC0=
+MD5-Digest: saSZ5dtWYxMPDzN6svD+lg==
+
+Name: ./jni/STA.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: nEJ3iujtVaHY41S00J/KQSp6MTc=
+MD5-Digest: N3O7B829ib75rCZgY1lifw==
+
+Name: ./jni/STA.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: +VwuhNMGYzZ9aGjZX/YPppDdO1A=
+MD5-Digest: G+RltDyKn4lfuOR9XSQxUA==
+
+Name: ./jni/STA.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: KUDmvPyX3TI/FlQlk/7NLmZVHZs=
+MD5-Digest: kBJEBoZm/30B9aHP7jAxhg==
+
+Name: ./jni/StdAfx.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: QXk1fqHJAYChd8X7CH73V6EJqgU=
+MD5-Digest: rkapC0u6Da9N3BzEShh5uA==
+
+Name: ./jni/StdAfx.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: i9b1viSLE73TdBRHyEYqCQnHdok=
+MD5-Digest: O9mOBXwgjNSj0cF5bibF3g==
+
+Name: ./jni/stdafx.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: WY6n8VAjHD+D+8yfca65Lv2Yanc=
+MD5-Digest: 1ZNNwyP06I7kkDqF1oWmYA==
+
+Name: ./jni/util.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: svps5GbrBIhBersEfXdVDaRxwdM=
+MD5-Digest: V3cYxfy/UdMYgPE4LU2jQw==
+
+Name: ./jni/util.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: If9oIOxyhA0rL44GJlLkrc1IDPg=
+MD5-Digest: A7UlJkDnsxJEKCtn6G1UOw==
+
+Name: ./jni/util.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: Eycr3pdkbM6wpCusv6ppEtXavQQ=
+MD5-Digest: HiuPDNWBFDdn7X4DutL/mw==
+
+Name: ./jni/Variant.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: ZVW7VPsmlHWKjuTpZKs08XlS320=
+MD5-Digest: faCR0N6dP5W+bxzgvblpsA==
+
+Name: ./jni/Variant.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: xEKVgKNM1RnfDIKpP01mHj+3SqU=
+MD5-Digest: jeRydyEBbi2E+WLhuKANIg==
+
+Name: ./jni/Variant.obj
+Digest-Algorithms: SHA MD5
+SHA-Digest: VkpRSFzVd3DOh5l14/Ohhf3+FBM=
+MD5-Digest: 0A4By2V6SdUdFYoNaELkSA==
+
+Name: ./LICENSE.TXT
+Digest-Algorithms: SHA MD5
+SHA-Digest: f6pMV3+4WoA2adisGIy1Rax2W8o=
+MD5-Digest: fCYjCTNV8MYNNuW3i2aTFw==
+
+Name: ./makefile
+Digest-Algorithms: SHA MD5
+SHA-Digest: 8fbp+qFE+YwIwHcapQbHKyq6QE8=
+MD5-Digest: /37LTLMPhiaLolS1X1k1HQ==
+
+Name: ./README.TXT
+Digest-Algorithms: SHA MD5
+SHA-Digest: NCWTHs86RAcfK917rbotr81sExc=
+MD5-Digest: +KTt8W0TCJsei2AxVFpQFQ==
+
+Name: ./samples/ado/ADO_README.txt
+Digest-Algorithms: SHA MD5
+SHA-Digest: vyqm9URm65OyGqdOiWCuk67W94I=
+MD5-Digest: gP7U0PwFXCXojgEkzzXYIg==
+
+Name: ./samples/ado/Command.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: VYX5u7DXdbMzqsFPgv5yox5adKs=
+MD5-Digest: ZISCJalFcRGqxRX+172meg==
+
+Name: ./samples/ado/Command.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: u/GPTs8U4XUh8qsXCYrkGpmAq58=
+MD5-Digest: hru+Ns3kuh7ukNMEo7UYlw==
+
+Name: ./samples/ado/CommandTypeEnum.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: hegtG5C8KdUCTpjqfsU30otxd3Y=
+MD5-Digest: aBVcQnMQtpARZsSJcrxoPg==
+
+Name: ./samples/ado/CommandTypeEnum.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: 7fa7uxQ9WMUFB6ms7rEi3nKyM/s=
+MD5-Digest: Ey7VKrr+74MTFlyJRdK1WQ==
+
+Name: ./samples/ado/Connection.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: jmve106WOcmbLHhPKwQolgOEl0c=
+MD5-Digest: TGjR6vuVVJkepeC8Bkx0Mw==
+
+Name: ./samples/ado/Connection.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: aIz0OGEkKM5qhfqGPDaizgSQH6o=
+MD5-Digest: uKdIqNEb0fQW6/F54+ULyg==
+
+Name: ./samples/ado/Field.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: jxR9z2XYejS/LMekS66Slmc7/Wc=
+MD5-Digest: sGuUfiZ0YbwCsSmI6mrHCQ==
+
+Name: ./samples/ado/Field.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: yXzIXtij0oGqhOpZViy+2GzMqgA=
+MD5-Digest: gjaIquVdHvBcVczuTZjqMQ==
+
+Name: ./samples/ado/Fields.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 1qWM9CqE5xj2nH7qFOJ6MGY8CjI=
+MD5-Digest: 9rkQ0Cdn32mX+NkIr6JiQg==
+
+Name: ./samples/ado/Fields.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: blVsEdbjJxuW4X4jO9CWgQirOm4=
+MD5-Digest: As+B/G3vm+k5pzQWXTAsdw==
+
+Name: ./samples/ado/ms/README
+Digest-Algorithms: SHA MD5
+SHA-Digest: WYL+bmWW1nkqEGoOHgf4E5+80Lw=
+MD5-Digest: VPd6NUQNQ5kJOgMbpyCd4A==
+
+Name: ./samples/ado/ms/testms.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: RoKESkqQJiR1k9PRG0VbhdjRChE=
+MD5-Digest: GHy6MwcQVWfuBMTWFX3tdg==
+
+Name: ./samples/ado/ms/testms.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: GW9uXFNDW4pTPSjZHo2D5lFc/zU=
+MD5-Digest: +6iJfY4I6HB/eA8LcgKB6A==
+
+Name: ./samples/ado/Recordset.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 7DOBgOnKy6VMFm7V59fULgPEfio=
+MD5-Digest: M5HhfmAKFb/b/C6csy69wA==
+
+Name: ./samples/ado/Recordset.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: WSFzf787gED6BkN3vSVGhXxb/XU=
+MD5-Digest: aOk5BtJdTTJuJpGyWUpRIg==
+
+Name: ./samples/ado/test.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: AEXzmSw0nhniEgEgcHEqSAIY6cs=
+MD5-Digest: nQp4MdGvsHDnkVG1CzDRrA==
+
+Name: ./samples/ado/test.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: u59LMxRc+XIhuM/vHtznkCLC0IE=
+MD5-Digest: b4q8u/F+GYhyWIr1cM8EdA==
+
+Name: ./samples/applet/AppTest.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: n56Is99dBgC8tQ6K9IqwYnALkmI=
+MD5-Digest: FdQ7a7vx1CXpNinMKQEveQ==
+
+Name: ./samples/applet/AppTest.html
+Digest-Algorithms: SHA MD5
+SHA-Digest: 2pGYv1dUavvaMY+1b0hBhS9mv3Y=
+MD5-Digest: rZWQxtKOziVCquj5M6GFFw==
+
+Name: ./samples/applet/AppTest.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: pC2PW5TpOHZuAYJGm9B1Od/BRw4=
+MD5-Digest: qMKmotn7i7fzaPgoBD6gdQ==
+
+Name: ./samples/README.txt
+Digest-Algorithms: SHA MD5
+SHA-Digest: 9kyVx/ey8MxEfF1HATrDZlg9Rxk=
+MD5-Digest: gRXrNz3NEKFy7fasoujArg==
+
+Name: ./samples/servlet/JacobScript.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: NY4hemo3uGEIBCWTyyyzm7a0CzQ=
+MD5-Digest: MUuHIxHh6F98jE0YH7P+bg==
+
+Name: ./samples/servlet/JacobScript.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: dvp/KSXGqV6gC2s9NPzTvAbm0uc=
+MD5-Digest: JUP2vLcS7M4pe9uWJsIOWw==
+
+Name: ./samples/servlet/readme.txt
+Digest-Algorithms: SHA MD5
+SHA-Digest: GE4VxwDk3uAEQDBvvWBoOe4KKXw=
+MD5-Digest: 1MSy/NVW2EyTybpjuagEIQ==
+
+Name: ./samples/test/Access.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: YJ8ho+ID8ugfEDWCPxYbNoiNpsE=
+MD5-Digest: QInWVJKkR9hjDynEpHjVOQ==
+
+Name: ./samples/test/Access.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: uqv9slXCqv98mTceAxd95Y7Vrh0=
+MD5-Digest: fpK035MccuE2h/Z01omyOA==
+
+Name: ./samples/test/atl/MultiFace/dlldata.c
+Digest-Algorithms: SHA MD5
+SHA-Digest: HWTbDhfSULe5RQibEUEI830BLuE=
+MD5-Digest: 0+48R+h0ivE4WGRJFfPJDA==
+
+Name: ./samples/test/atl/MultiFace/Face.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: OhddW2y86e39z4U0TPDtqmB+MmA=
+MD5-Digest: 4dTrCiRHhORZk4BnDf7z3w==
+
+Name: ./samples/test/atl/MultiFace/Face.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: y0gekndtQPP58IyEFliYdG37qns=
+MD5-Digest: GTxFB6uT1X5vEGI0WcrL/Q==
+
+Name: ./samples/test/atl/MultiFace/Face.rgs
+Digest-Algorithms: SHA MD5
+SHA-Digest: F8u+qbVSCFIKnUMKvvy5UYQ+HLs=
+MD5-Digest: S4ANAdXVLXbCPN2x7uD5pQ==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.aps
+Digest-Algorithms: SHA MD5
+SHA-Digest: lQbTvrX5Vvm9994+oYa+l9zCrMI=
+MD5-Digest: u2p9rqJFCAD8E0y/GBYa9w==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: k3Fh0X2Zf2P5HFYX0XBC3cr8F8U=
+MD5-Digest: dgadf5J+z2FmRkZrARoVhw==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.def
+Digest-Algorithms: SHA MD5
+SHA-Digest: 2LcCcz80Nw99Cplvy56LVfKj4AQ=
+MD5-Digest: u/wev8ycCsOtBXjq4koWsA==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.dsp
+Digest-Algorithms: SHA MD5
+SHA-Digest: EP934454nHfECg4uMbMpi2qSiBg=
+MD5-Digest: BpITlBALRWf1UnbtvqJ1tw==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.dsw
+Digest-Algorithms: SHA MD5
+SHA-Digest: HPkFe3R5aG/7zdtwSpPIvCoJrX8=
+MD5-Digest: JwOWHmGnfAJWodLnqiA4ig==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: NzYDi990PqhD0pyW/XswKUHiQGI=
+MD5-Digest: I4SDltcfIyyBFfg71dSKoA==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.idl
+Digest-Algorithms: SHA MD5
+SHA-Digest: rE8NyFJgJFgoxHYEFJRFTwIGTjA=
+MD5-Digest: Yf3mnqG5Jx/iSE5S/1N3QA==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.ncb
+Digest-Algorithms: SHA MD5
+SHA-Digest: 7GDt/Nx4jef09B5ACmv+1xqcQt4=
+MD5-Digest: zyxbqfMC8PmDrMRA4VvVcA==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.opt
+Digest-Algorithms: SHA MD5
+SHA-Digest: 9KOiwG4QxIFaNgVtYosl9rn4F5Q=
+MD5-Digest: Ai1X3ztSmyZneaivsOIhgA==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.plg
+Digest-Algorithms: SHA MD5
+SHA-Digest: GgHEYrPCgoTvQJbLVkGSucuJI84=
+MD5-Digest: fzXVPatmqIW5BKWNn20x1w==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.rc
+Digest-Algorithms: SHA MD5
+SHA-Digest: cKcPvkLwFvr2SpNabMVU4LRCHQQ=
+MD5-Digest: B81k6bAmMI8mY9pywHyQ9Q==
+
+Name: ./samples/test/atl/MultiFace/MultiFace.tlb
+Digest-Algorithms: SHA MD5
+SHA-Digest: 45izBsDG1ouPhqTvH8IDPK9oNlY=
+MD5-Digest: 5smfNJ6a5a/r3EBBmZN/Yw==
+
+Name: ./samples/test/atl/MultiFace/MultiFaceps.def
+Digest-Algorithms: SHA MD5
+SHA-Digest: BZnsV6gPHLCjBY1gkyjg/SCOw+4=
+MD5-Digest: nAyFg5jxyfxmfe2MD3C1vA==
+
+Name: ./samples/test/atl/MultiFace/MultiFaceps.mk
+Digest-Algorithms: SHA MD5
+SHA-Digest: bJNeboLTRvXTAOuiiEboGEW6s/8=
+MD5-Digest: L+Fei2KII1dnTm5Goszing==
+
+Name: ./samples/test/atl/MultiFace/MultiFace_i.c
+Digest-Algorithms: SHA MD5
+SHA-Digest: L+orpCaMGOQ+onrBja2eUcqCkZg=
+MD5-Digest: EMEes+f0GfZuWG1TY8iItg==
+
+Name: ./samples/test/atl/MultiFace/MultiFace_p.c
+Digest-Algorithms: SHA MD5
+SHA-Digest: qhXfLrVwc3+a2zQh3nqfuMMXJj4=
+MD5-Digest: PddZdwiG4GABL2pFOgRWjg==
+
+Name: ./samples/test/atl/MultiFace/resource.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: ltVpL0yIoPqNP533PfXz0Mz3or0=
+MD5-Digest: 67snAuAXM2aTH3ZXCjkOsg==
+
+Name: ./samples/test/atl/MultiFace/StdAfx.cpp
+Digest-Algorithms: SHA MD5
+SHA-Digest: rRcr4BUiUcSuC9HT6rQc5MToiHk=
+MD5-Digest: I/3OLbvTOW7wzD1mshUuuQ==
+
+Name: ./samples/test/atl/MultiFace/StdAfx.h
+Digest-Algorithms: SHA MD5
+SHA-Digest: q4qcVRmFU7LYISdjJeW4CgEE9Xg=
+MD5-Digest: jPsHuOvPDPZYxq1xxcvLsg==
+
+Name: ./samples/test/atl/MultiFace.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 68ZRr3nlrxp7xvgB8QtPLvBXkB0=
+MD5-Digest: +E/sNJRVhdK9DvCHDKyeKA==
+
+Name: ./samples/test/atl/MultiFace.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: RD5SVQAbELsukdxLSrAlVraY5Rw=
+MD5-Digest: O0/kAOqvz9Y1Gow65MmdJQ==
+
+Name: ./samples/test/atl/readme.txt
+Digest-Algorithms: SHA MD5
+SHA-Digest: EHBHwONmkXMZLgpTRc6m8pORye0=
+MD5-Digest: D+oj7h9BOskXCcBQuBSFdw==
+
+Name: ./samples/test/DispatchTest.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: b+R4oUyy/tugq7jgd+ZKEzqd5pI=
+MD5-Digest: Uf5nmYcYZrCNk/YSYyUpcA==
+
+Name: ./samples/test/DispatchTest.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: W0BY50++uyVxEmDh8soynVg6lwI=
+MD5-Digest: A6oIyzfJUCR1M6k3fQQz8Q==
+
+Name: ./samples/test/errEvents.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: EzYY0sXl18eP1HDctmCpgEWXxxI=
+MD5-Digest: 2ZH6Pcx49W7FYL9aF1qiPQ==
+
+Name: ./samples/test/foo.foo
+Digest-Algorithms: SHA MD5
+SHA-Digest: hKLRQFDind7Bt/el/UA0bOILVEc=
+MD5-Digest: LfWLkubtUd37afJ4Ctu48A==
+
+Name: ./samples/test/foo.ser
+Digest-Algorithms: SHA MD5
+SHA-Digest: lmeuI3I317iY2RKqZL40s3zMkZA=
+MD5-Digest: D73llNfjRNWi6/yEfqjcZg==
+
+Name: ./samples/test/IEEvents.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: MzKjQ9LnBvcLGqb4eIoYX3pbWro=
+MD5-Digest: rLvMvumb3zT+lmpnH12/0g==
+
+Name: ./samples/test/IETest.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 7wOaFqd2TvqatunZ8cgjkuwvAmc=
+MD5-Digest: +Jlit06yZxTmsaTAGLjR8A==
+
+Name: ./samples/test/IETest.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: t3BKHw/pqw5198/fE3ttMMBijbE=
+MD5-Digest: oBRVGqLdSZSxD6Acpne9mA==
+
+Name: ./samples/test/jacobtest.xls
+Digest-Algorithms: SHA MD5
+SHA-Digest: iPakwQbwO78iKOXAnKi7J1vzvEs=
+MD5-Digest: n07pNBLHIG662l3KfsZWdg==
+
+Name: ./samples/test/math.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: Z4QCBzw8I8743G2bsANsMvYvQjU=
+MD5-Digest: oAuf3ElYdBR3Lmrq0+d9Og==
+
+Name: ./samples/test/math.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: n8YiT1GFbeaWXLMy+INu2Wfl7/k=
+MD5-Digest: h1G6CVTiAFjm7Re1f64NEA==
+
+Name: ./samples/test/MathProj/Math.cls
+Digest-Algorithms: SHA MD5
+SHA-Digest: CZJcmhZCs1+1p4NO71dggowWNc8=
+MD5-Digest: +gkN44UHyxn83JeQVf+E6Q==
+
+Name: ./samples/test/MathProj/MathTest.dll
+Digest-Algorithms: SHA MD5
+SHA-Digest: hoUwAKBHCK55cn7JdsA3wBf/Bn0=
+MD5-Digest: 3BcNgFO5perWuHx79V0mXg==
+
+Name: ./samples/test/MathProj/MathTest.exp
+Digest-Algorithms: SHA MD5
+SHA-Digest: ff9RS0k+cu2JO360qYqMoA1oJuA=
+MD5-Digest: FNmayjvq8mTjLcIUbX5Zkw==
+
+Name: ./samples/test/MathProj/MathTest.lib
+Digest-Algorithms: SHA MD5
+SHA-Digest: 62KdZxK15c8CLHZXYnJxbrjuBIc=
+MD5-Digest: Is8yCaURP4hrKCZbNWmW7Q==
+
+Name: ./samples/test/MathProj/MathTest.vbp
+Digest-Algorithms: SHA MD5
+SHA-Digest: I/k59CxSo5KBb/Mj0zLXnB/gpDU=
+MD5-Digest: Iil+Tidd/5EWFe5TnPwhiA==
+
+Name: ./samples/test/MathProj/MathTest.vbw
+Digest-Algorithms: SHA MD5
+SHA-Digest: h3dc5rr6p7aV45U26F4DyFTJM7I=
+MD5-Digest: LudpvbnfPRzD0GwfkSjRdg==
+
+Name: ./samples/test/MathProj/README
+Digest-Algorithms: SHA MD5
+SHA-Digest: nPVI0dpp+w5yLvy/p9le2e4BwiY=
+MD5-Digest: S8VlUENr3X79v9OFAUljyQ==
+
+Name: ./samples/test/Outlook.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: DbN+VE/zRE6P+R2qIph048KmCl8=
+MD5-Digest: Sxs8kOpskGsoOpwnSJxX2g==
+
+Name: ./samples/test/Outlook.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: OBV8N5rPxKJliq2DSDxLlJe8+2c=
+MD5-Digest: 1ZgPwE5lkgetta1TElh2Iw==
+
+Name: ./samples/test/safearray.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: C9m0td07CI3WCNqMvDgCReVBk4U=
+MD5-Digest: 3sWM1BZ/M6XrqeIJCSnIfw==
+
+Name: ./samples/test/safearray.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: /F4AvsA0zZN/I7cJAr1sHRsw+Fc=
+MD5-Digest: oKA2jfEuphjZf30RyxJsvQ==
+
+Name: ./samples/test/sample2.mdb
+Digest-Algorithms: SHA MD5
+SHA-Digest: Wp2D73waAFiEmDPw8ji7q+jZgFQ=
+MD5-Digest: ZKs2YBS5XVEK9iDtHnGUpw==
+
+Name: ./samples/test/sa_dispatch.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: nCuBxiPc21pt7CnmxD+TIV4x1FI=
+MD5-Digest: IhuUwtw0m6RfONvXtqvSAw==
+
+Name: ./samples/test/sa_dispatch.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: tIIx4FMZGe7k6+GH4ajRoWPJvyY=
+MD5-Digest: DWknkLquVVJKRyKYSfXSOA==
+
+Name: ./samples/test/sa_test.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: NhQ8ICD0BX3upJ3yhPox7D4OrYw=
+MD5-Digest: 2J2GkyWd+qfgf7Fjs8JnwA==
+
+Name: ./samples/test/sa_test.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: R682jIXe76aB9kJyNM0wtbZqtxU=
+MD5-Digest: qLpQzDlRNgHUMSNvW9F9Vw==
+
+Name: ./samples/test/ScriptTest.bat
+Digest-Algorithms: SHA MD5
+SHA-Digest: bxoaT2EWQv5FYtCWB0e9T89wJ2c=
+MD5-Digest: iQQJtrBB1MZ6ljtIXoqIxQ==
+
+Name: ./samples/test/ScriptTest.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 9McitGPdEWuF+klNFu9Op2dcOuk=
+MD5-Digest: SzDmf+iH5s/E1EmYPh208w==
+
+Name: ./samples/test/ScriptTest.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: yo2azi6j2xgIDKymZGO5l4FEdjE=
+MD5-Digest: P/DSKEt74WRFIgJqRVHVtw==
+
+Name: ./samples/test/ScriptTest2.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: LktPbcouI60ec7wmvfmurGSFaT4=
+MD5-Digest: OygfOlXJlkqn1x4TM8eI7g==
+
+Name: ./samples/test/ScriptTest2.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: HTrcf7IR3Og5i0xIw1mB7F4i0AY=
+MD5-Digest: cyeOvZyeb0ZMjYFwAuCvRw==
+
+Name: ./samples/test/ScriptTest3.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: ZdD9Uar1kiYkiiOrOG5/Zs/gKHQ=
+MD5-Digest: JP8N1C1bKhlZUzjNWjtfMw==
+
+Name: ./samples/test/ScriptTest3.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: Q0QxUzUMaIEUiuSiCYFDh8tPWzk=
+MD5-Digest: 2JjocMlhddWcUXsKb3Arlw==
+
+Name: ./samples/test/speed.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: DdOhaT+V3Gz8lUFpTjkNHU8yUHI=
+MD5-Digest: 10C0cOv36ugsmjtRdWiYeQ==
+
+Name: ./samples/test/speed.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: VRRtx5ebOKZ9w9i7zr5tjiGHtSA=
+MD5-Digest: fW3+AiO4odk/dPP8QRwP7g==
+
+Name: ./samples/test/test.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: 0F3HoVHLRbxeIftBk5xSiayuruw=
+MD5-Digest: xmgAS3ZMreVcVetw+Emz6w==
+
+Name: ./samples/test/test.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: fDgQ7roF5yECQWDgqE/H7hMS9lY=
+MD5-Digest: C+R1qFuy0KYA6+NpE6lcMw==
+
+Name: ./samples/test/testEvents.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: VgQZMlTDKdXwHwnO+pg34FVxe+s=
+MD5-Digest: pxOGqcHhcNCgpLrq961CYA==
+
+Name: ./samples/test/variant_test.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: rhCKxgFsnz4DCR3V6ZCnGZMKHNc=
+MD5-Digest: U6IqRLGkVKIi6GYMVfQaJQ==
+
+Name: ./samples/test/variant_test.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: 7NFXoGskiCa/ZL7U8Acx/uZkdTE=
+MD5-Digest: xPiJ1/PwMsYlUPlAiR+wkg==
+
+Name: ./samples/test/varSerTest.class
+Digest-Algorithms: SHA MD5
+SHA-Digest: EyK1bvd0fQXevbJJfukQqFSTq+0=
+MD5-Digest: ceVxF+Oz7CJF5whitqs7IA==
+
+Name: ./samples/test/varSerTest.java
+Digest-Algorithms: SHA MD5
+SHA-Digest: 1kR1a6FqMGKYgazH8ZllBmTxWN4=
+MD5-Digest: E+9UQHIkQN/XII2libkWXw==
+
+Name: ./todo.txt
+Digest-Algorithms: SHA MD5
+SHA-Digest: GuE6XLByuSmPs4Q3TX8Qs2JRSro=
+MD5-Digest: KtiB8O69ft5CCxNs+T9zZQ==
+
+Name: ./vstudio/jacob/jacob.dsp
+Digest-Algorithms: SHA MD5
+SHA-Digest: nreCezgQ/DKa7TQ4Cj28cRzKQzM=
+MD5-Digest: GOjDddOu1ZU5r0iGcEZzaw==
+
+Name: ./vstudio/jacob/jacob.dsw
+Digest-Algorithms: SHA MD5
+SHA-Digest: yB8Hhn1M6jX7cOBloxUL2pAFf7Y=
+MD5-Digest: hGWX78QoGIXxJed6eeTbAQ==
+
+Name: ./vstudio/jacob/jacob.ncb
+Digest-Algorithms: SHA MD5
+SHA-Digest: xSDLS4QUbjm8RHNL/Qzq70zkYlk=
+MD5-Digest: PK8cmkqwvTT9ECgqFhpdVQ==
+
+Name: ./vstudio/jacob/jacob.opt
+Digest-Algorithms: SHA MD5
+SHA-Digest: ZI/dl8LS/Sp5vpLdODDNox8LfMc=
+MD5-Digest: 90HtjVn8YtapmRMC9MAp0g==
+
+Name: ./vstudio/jacob/jacob.plg
+Digest-Algorithms: SHA MD5
+SHA-Digest: 6D62etCgUdwooRVezsQCR5GG79M=
+MD5-Digest: FEkATqvQLJeVQzpfboND4A==
+
+Name: ./WhatsNew.html
+Digest-Algorithms: SHA MD5
+SHA-Digest: WZmYYAE5PedacDkqwqNPFlp4vSE=
+MD5-Digest: WVceOUyV6DUWlncvAuqzpw==
+
diff --git a/jacob/README.TXT b/jacob/README.TXT
new file mode 100644
index 0000000..c4a5c9c
--- /dev/null
+++ b/jacob/README.TXT
@@ -0,0 +1,28 @@
+For documentation see: http://users.rcn.com/danadler/jacob/
+
+The java code is in com\jacob\*.
+
+The C++ code is in .\jni.
+
+To build, run:
+
+nmake -f makefile
+
+That will first compile the JAVA files and build the JAR file, and
+then compile the C++ code and build the DLL.
+
+Building the jni:
+
+The following are hardcoded into the makefile, so you may have to
+change it. I developed this with the C++ compiler and ATL version
+that ship with VC++ 6.0, so I'm not sure if different versions will
+work.
+
+I have compiled this against JDK 1.1.6 and 1.2.2 as well as Microsoft
+SDK for Java 3.2 as the JDK setting.
+
+DEST_DIR is a destination directory into which to copy the final DLL.
+
+JDK = d:\j2sdk1.4.2_06
+DEST_DIR = d:\jacob
+MSDEVDIR = d:\apps\\"Microsoft Visual Studio"\VC98
diff --git a/jacob/WhatsNew.html b/jacob/WhatsNew.html
new file mode 100644
index 0000000..85c6bb3
--- /dev/null
+++ b/jacob/WhatsNew.html
@@ -0,0 +1,114 @@
+What's New in JACOB 1.8
+
+
+-
+Move To SourceForge
+The project is not housed at
+Sourceforge.net.
+
+
+-
+Licensing Change
+All limitations on commercial use of JACOB have been removed and it
+is now being developed under a BSD license at
+Sourceforge.net.
+
+
+-
+Compiled with Java 1.4.2
+Version 1.8 was compiled with JSEE 1.4.2 and fixes the compilation bug
+that was remnant of compilation with JDK 1.1.
+
+
+-
+Baseline For Change
+This version is the baseline for the first CVS checkin and we encourage
+people to start contributing to the project with this version.
+
+
+
+
+ -
+
What's New in JACOB 1.7
+
+
+-
+Explicit COM Threading Model Support:
+See a detailed discussion of
+COM Apartments in JACOB
+
+
+-
+New COM Object Lifetime model:
+See a detailed discussion of
+COM Object Lifetime in JACOB.
+
+
+-
+Improved Event Handling:
+Thanks to code contributed by
+
+Niels Olof Bouvin
+and Henning Jae JACOB 1.7 can
+read the type information of a Connection Point interface by looking
+it up in the registry. This makes it possible to use events with IE as
+well as office products.
+
+
+
+-
+Improved Dispatch:
+Error messages from Invoke failures are now printed out as well as
+allowing the passing in of arguments to a Get method.
+
+
+-
+EnumVariant Implementation:
+Makes it easier to iterate over COM collections. Thanks to code
+contributed by
+Thomas Hallgren.
+
+
+-
+SafeArray leaks:
+SafeArrays were not being properly freed prior to version 1.7, many
+other memory leaks were fixed as well.
+
+
+-
+Visual Studio Project:
+For those who want to debug: vstudio/jacob. At the moment all the
+native code is replicated there from the jni directory...
+
+
+
+Related Links
+
+-
+The JACOB mailing list is hosted at yahoo groups:
+
+http://groups.yahoo.com/group/jacob-project.
+This is the preferred way to get support for JACOB. It also
+includes an extensive archive. If you are doing any development with
+JACOB, please join the list.
+
-
+Massimiliano Bigatti has developed
+
+Jacobgen - a generator that automatically creates JACOB code from
+Type Libraries
+
+-
+Steven Lewis is developing a version of Java2Com that supports JACOB
+code generation. See:
+
+http://www.lordjoe.com/Java2Com/index.html.
+
-
+To find documentation on the com.ms.com package, go to:
+
+http://www.microsoft.com/java/download/dl_sdk40.htm
+and at the bottom of the page is a link that says:
+Microsoft SDK for Java 4.0 Documentation Only. You should download
+that file and install it. Then, view sdkdocs.chm and look for
+"Microsoft Packages Reference". Hopefully, the next release of
+JACOB will include full javadoc (volunteers?)...
+
diff --git a/jacob/com/jacob/activeX/ActiveXComponent.java b/jacob/com/jacob/activeX/ActiveXComponent.java
new file mode 100644
index 0000000..6835076
--- /dev/null
+++ b/jacob/com/jacob/activeX/ActiveXComponent.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.activeX;
+
+import com.jacob.com.*;
+
+/**
+ * This class simulates com.ms.activeX.ActiveXComponent only as
+ * it used for creating Dispatch objects
+ */
+public class ActiveXComponent extends Dispatch
+{
+ public ActiveXComponent(String progid)
+ {
+ super(progid);
+ }
+
+ public Object getObject()
+ {
+ return this;
+ }
+
+ public Variant invoke(String name, Variant[] args)
+ {
+ return Dispatch.callN(this, name, args);
+ }
+
+ public Variant getProperty(String name)
+ {
+ return Dispatch.get(this, name);
+ }
+
+ public void setProperty(String name, Variant arg)
+ {
+ Dispatch.put(this, name, arg);
+ }
+
+ protected void finalize()
+ {
+ super.finalize();
+ }
+
+ static {
+ System.loadLibrary("jacob");
+ }
+}
diff --git a/jacob/com/jacob/com/ComException.java b/jacob/com/jacob/com/ComException.java
new file mode 100644
index 0000000..742d703
--- /dev/null
+++ b/jacob/com/jacob/com/ComException.java
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+public abstract class ComException extends RuntimeException
+{
+ // Fields
+ protected int hr;
+ protected int m_helpContext;
+ protected String m_helpFile;
+ protected String m_source;
+
+ // Constructors
+ public ComException()
+ {
+ super();
+ }
+
+ public ComException(int hr)
+ {
+ super();
+ this.hr = hr;
+ }
+
+ public ComException(int hr, String description)
+ {
+ super(description);
+ this.hr = hr;
+ }
+
+ public ComException(int hr, String source, String helpFile,
+ int helpContext)
+ {
+ super();
+ this.hr = hr;
+ m_source = source;
+ m_helpFile = helpFile;
+ m_helpContext = helpContext;
+ }
+
+ public ComException(int hr, String description, String source,
+ String helpFile, int helpContext)
+ {
+ super(description);
+ this.hr = hr;
+ m_source = source;
+ m_helpFile = helpFile;
+ m_helpContext = helpContext;
+ }
+
+ public ComException(String description)
+ {
+ super(description);
+ }
+
+ // Methods
+ public int getHelpContext() { return m_helpContext; }
+ public String getHelpFile() { return m_helpFile; }
+ public int getHResult() { return hr; }
+ public String getSource() { return m_source; }
+}
diff --git a/jacob/com/jacob/com/ComFailException.java b/jacob/com/jacob/com/ComFailException.java
new file mode 100644
index 0000000..6f72140
--- /dev/null
+++ b/jacob/com/jacob/com/ComFailException.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+public class ComFailException extends ComException
+{
+ // Constructors
+ public ComFailException(int hr)
+ {
+ super(hr);
+ }
+ public ComFailException(int hr, String message)
+ {
+ super(hr, message);
+ }
+
+ public ComFailException(int hr, String source, String helpFile,
+ int helpContext)
+ {
+ super(hr, source, helpFile, helpContext);
+ }
+
+ public ComFailException(int hr, String description,
+ String source, String helpFile, int helpContext)
+ {
+ super(hr, description, source, helpFile, helpContext);
+ }
+
+ public ComFailException()
+ {
+ super();
+ }
+
+ public ComFailException(String message)
+ {
+ super(message);
+ }
+}
diff --git a/jacob/com/jacob/com/ComThread.java b/jacob/com/jacob/com/ComThread.java
new file mode 100644
index 0000000..f375060
--- /dev/null
+++ b/jacob/com/jacob/com/ComThread.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+import java.util.Hashtable;
+import java.util.Vector;
+
+public abstract class ComThread
+{
+ private static final int MTA = 0x0;
+ private static final int STA = 0x2;
+
+ public static boolean haveSTA = false;
+ public static MainSTA mainSTA = null;
+
+ /**
+ * Initialize the current java thread to be part of the
+ * Multi-threaded COM Apartment
+ */
+ public static synchronized void InitMTA()
+ {
+ InitMTA(false);
+ }
+
+ /**
+ * Initialize the current java thread to be an STA
+ */
+ public static synchronized void InitSTA()
+ {
+ InitSTA(false);
+ }
+
+ /**
+ * Initialize the current java thread to be part of the
+ * Multi-threaded COM Apartment, if createMainSTA is true,
+ * create a separate MainSTA
+ * thread that will house all Apartment Threaded components
+ */
+ public static synchronized void InitMTA(boolean createMainSTA)
+ {
+ Init(createMainSTA, MTA);
+ }
+
+ /**
+ * Initialize the current java thread to be an STA
+ * COM Apartment, if createMainSTA is true,
+ * create a separate MainSTA
+ * thread that will house all Apartment Threaded components
+ */
+ public static synchronized void InitSTA(boolean createMainSTA)
+ {
+ Init(createMainSTA, STA);
+ }
+
+ public static synchronized void startMainSTA()
+ {
+ mainSTA = new MainSTA();
+ haveSTA = true;
+ }
+
+ public static synchronized void quitMainSTA()
+ {
+ if (mainSTA != null) mainSTA.quit();
+ }
+
+ /**
+ * Initialize the current java thread to be part of the
+ * MTA/STA COM Apartment
+ */
+ public static synchronized void Init(boolean createMainSTA, int mode)
+ {
+ if (createMainSTA && !haveSTA)
+ {
+ // if the current thread is going to be in the MTA and there
+ // is no STA thread yet, then create a main STA thread
+ // to avoid COM creating its own
+ startMainSTA();
+ }
+ //System.out.println("before Init: "+mode);
+ doCoInitialize(mode);
+ //System.out.println("after Init");
+ ROT.addThread();
+ //System.out.println("after ROT.addThread");
+ }
+
+ /**
+ * Call CoUninitialize to release this java thread from COM
+ */
+ public static synchronized void Release()
+ {
+ //System.out.println("before clearObjects");
+ ROT.clearObjects();
+ //System.out.println("before UnInit");
+ doCoUninitialize();
+ //System.out.println("after UnInit");
+ }
+
+ public static native void doCoInitialize(int threadModel);
+ public static native void doCoUninitialize();
+
+ static {
+ System.loadLibrary("jacob");
+ }
+}
diff --git a/jacob/com/jacob/com/Dispatch.java b/jacob/com/jacob/com/Dispatch.java
new file mode 100644
index 0000000..2d351a8
--- /dev/null
+++ b/jacob/com/jacob/com/Dispatch.java
@@ -0,0 +1,546 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+import java.lang.reflect.Array;
+
+public class Dispatch extends JacobObject
+{
+ public int m_pDispatch;
+ public static final int LOCALE_SYSTEM_DEFAULT = 2048;
+ public static final int Method = 1;
+ public static final int Get = 2;
+ public static final int Put = 4;
+ public static final int PutRef = 8;
+ public static final int fdexNameCaseSensitive = 1;
+ public static final int DISPID_UNKNOWN = -1;
+ public static final int DISPID_VALUE = 0;
+ public static final int DISPID_PROPERTYPUT = -3;
+ public static final int DISPID_NEWENUM = -4;
+ public static final int DISPID_EVALUATE = -5;
+ public static final int DISPID_CONSTRUCTOR = -6;
+ public static final int DISPID_DESTRUCTOR = -7;
+ public static final int DISPID_COLLECT = -8;
+ public static final int DISPID_AUTOSIZE = -500;
+ public static final int DISPID_BACKCOLOR = -501;
+ public static final int DISPID_BACKSTYLE = -502;
+ public static final int DISPID_BORDERCOLOR = -503;
+ public static final int DISPID_BORDERSTYLE = -504;
+ public static final int DISPID_BORDERWIDTH = -505;
+ public static final int DISPID_DRAWMODE = -507;
+ public static final int DISPID_DRAWSTYLE = -508;
+ public static final int DISPID_DRAWWIDTH = -509;
+ public static final int DISPID_FILLCOLOR = -510;
+ public static final int DISPID_FILLSTYLE = -511;
+ public static final int DISPID_FONT = -512;
+ public static final int DISPID_FORECOLOR = -513;
+ public static final int DISPID_ENABLED = -514;
+ public static final int DISPID_HWND = -515;
+ public static final int DISPID_TABSTOP = -516;
+ public static final int DISPID_TEXT = -517;
+ public static final int DISPID_CAPTION = -518;
+ public static final int DISPID_BORDERVISIBLE = -519;
+ public static final int DISPID_APPEARANCE = -520;
+ public static final int DISPID_MOUSEPOINTER = -521;
+ public static final int DISPID_MOUSEICON = -522;
+ public static final int DISPID_PICTURE = -523;
+ public static final int DISPID_VALID = -524;
+ public static final int DISPID_READYSTATE = -525;
+ public static final int DISPID_REFRESH = -550;
+ public static final int DISPID_DOCLICK = -551;
+ public static final int DISPID_ABOUTBOX = -552;
+ public static final int DISPID_CLICK = -600;
+ public static final int DISPID_DBLCLICK = -601;
+ public static final int DISPID_KEYDOWN = -602;
+ public static final int DISPID_KEYPRESS = -603;
+ public static final int DISPID_KEYUP = -604;
+ public static final int DISPID_MOUSEDOWN = -605;
+ public static final int DISPID_MOUSEMOVE = -606;
+ public static final int DISPID_MOUSEUP = -607;
+ public static final int DISPID_ERROREVENT = -608;
+ public static final int DISPID_READYSTATECHANGE = -609;
+ public static final int DISPID_AMBIENT_BACKCOLOR = -701;
+ public static final int DISPID_AMBIENT_DISPLAYNAME = -702;
+ public static final int DISPID_AMBIENT_FONT = -703;
+ public static final int DISPID_AMBIENT_FORECOLOR = -704;
+ public static final int DISPID_AMBIENT_LOCALEID = -705;
+ public static final int DISPID_AMBIENT_MESSAGEREFLECT = -706;
+ public static final int DISPID_AMBIENT_SCALEUNITS = -707;
+ public static final int DISPID_AMBIENT_TEXTALIGN = -708;
+ public static final int DISPID_AMBIENT_USERMODE = -709;
+ public static final int DISPID_AMBIENT_UIDEAD = -710;
+ public static final int DISPID_AMBIENT_SHOWGRABHANDLES = -711;
+ public static final int DISPID_AMBIENT_SHOWHATCHING = -712;
+ public static final int DISPID_AMBIENT_DISPLAYASDEFAULT = -713;
+ public static final int DISPID_AMBIENT_SUPPORTSMNEMONICS = -714;
+ public static final int DISPID_AMBIENT_AUTOCLIP = -715;
+ public static final int DISPID_AMBIENT_APPEARANCE = -716;
+ public static final int DISPID_AMBIENT_CODEPAGE = -725;
+ public static final int DISPID_AMBIENT_PALETTE = -726;
+ public static final int DISPID_AMBIENT_CHARSET = -727;
+ public static final int DISPID_AMBIENT_TRANSFERPRIORITY = -728;
+
+ // map args based on msdn doc
+ protected static Variant obj2variant(Object o)
+ {
+ if (o == null)
+ return new Variant();
+ if (o instanceof Variant)
+ return (Variant)o;
+ if (o instanceof Integer)
+ return new Variant(((Integer)o).intValue());
+ if (o instanceof String)
+ return new Variant((String)o);
+ if (o instanceof Boolean)
+ return new Variant(((Boolean)o).booleanValue());
+ if (o instanceof Double)
+ return new Variant(((Double)o).doubleValue());
+ if (o instanceof Float)
+ return new Variant(((Float)o).floatValue());
+ if (o instanceof SafeArray)
+ return new Variant((SafeArray)o);
+ if (o instanceof Dispatch) {
+ Variant v = new Variant();
+ v.putObject((Dispatch)o);
+ return v;
+ }
+ // automatically convert arrays using reflection
+ Class c1 = o.getClass();
+ SafeArray sa = null;
+ if (c1.isArray())
+ {
+ int len1 = Array.getLength(o);
+ Object first = Array.get(o, 0);
+ if (first.getClass().isArray())
+ {
+ int max = 0;
+ for (int i = 0; i < len1; i++)
+ {
+ Object e1 = Array.get(o, i);
+ int len2 = Array.getLength(e1);
+ if (max < len2)
+ {
+ max = len2;
+ }
+ }
+ sa = new SafeArray(Variant.VariantVariant, len1, max);
+ for (int i = 0; i < len1; i++)
+ {
+ Object e1 = Array.get(o, i);
+ for (int j = 0; j < Array.getLength(e1); j++)
+ {
+ sa.setVariant(i, j, obj2variant(Array.get(e1, j)));
+ }
+ }
+ } else {
+ sa = new SafeArray(Variant.VariantVariant, len1);
+ for (int i = 0; i < len1; i++)
+ {
+ sa.setVariant(i, obj2variant(Array.get(o, i)));
+ }
+ }
+ return new Variant(sa);
+ }
+ throw new ClassCastException("cannot convert to Variant");
+ }
+
+ // same as above, for an array
+ protected static Variant[] obj2variant(Object[] o)
+ {
+ Variant vArg[] = new Variant[o.length];
+ for(int i=0;i(Variant[] args)
+ protected native void init(Dispatch src, Object sink);
+ protected native void init2(Dispatch src, Object sink, String progId);
+
+ // call this to explicitly release the com object before gc
+ public native void release();
+
+ protected void finalize()
+ {
+ //System.out.println("DispatchEvents finalize start");
+ if (m_pConnPtProxy != 0) release();
+ //System.out.println("DispatchEvents finalize end");
+ }
+
+ static {
+ System.loadLibrary("jacob");
+ }
+}
diff --git a/jacob/com/jacob/com/DispatchProxy.java b/jacob/com/jacob/com/DispatchProxy.java
new file mode 100644
index 0000000..b384f39
--- /dev/null
+++ b/jacob/com/jacob/com/DispatchProxy.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+/**
+ * If you need to pass a COM Dispatch object between STA threads, you
+ * have to marshall the interface.
+ * This class is used as follows: the STA that creates the Dispatch
+ * object must construct an instance of this class. Another thread
+ * can then call toDispatch() on that instance and get a Dispatch
+ * pointer which has been marshalled.
+ * WARNING: You can only call toDispatch() once! If you need to call
+ * it multiple times (or from multiple threads) you need to construct
+ * a separate DispatchProxy instance for each such case!
+ */
+public class DispatchProxy extends JacobObject
+{
+ public int m_pStream;
+
+ public DispatchProxy(Dispatch localDispatch)
+ {
+ MarshalIntoStream(localDispatch);
+ }
+
+ public Dispatch toDispatch()
+ {
+ return MarshalFromStream();
+ }
+
+ private native void MarshalIntoStream(Dispatch d);
+ private native Dispatch MarshalFromStream();
+ public native void release();
+
+ public void finalize()
+ {
+ if (m_pStream != 0) release();
+ }
+}
diff --git a/jacob/com/jacob/com/EnumVariant.java b/jacob/com/jacob/com/EnumVariant.java
new file mode 100644
index 0000000..07519e7
--- /dev/null
+++ b/jacob/com/jacob/com/EnumVariant.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+/**
+ * An implementation of IEnumVariant based on code submitted by
+ * Thomas Hallgren (mailto:Thomas.Hallgren@eoncompany.com)
+ */
+public class EnumVariant extends JacobObject implements java.util.Enumeration
+{
+ private int m_pIEnumVARIANT;
+ private final Variant[] m_recBuf = new Variant[1];
+
+ // this only gets called from JNI
+ //
+ protected EnumVariant(int pIEnumVARIANT)
+ {
+ m_pIEnumVARIANT = pIEnumVARIANT;
+ }
+
+ public EnumVariant(Object disp)
+ {
+ int[] hres = new int[1];
+ Variant evv = Dispatch.invokev(
+ disp,
+ Dispatch.DISPID_NEWENUM,
+ Dispatch.Get,
+ new Variant[0],
+ hres);
+ if(evv.getvt() != Variant.VariantObject)
+ //
+ // The DISPID_NEWENUM did not result in a valid object
+ //
+ throw new ComFailException("Can't obtain EnumVARIANT");
+
+ EnumVariant tmp = evv.toEnumVariant();
+ m_pIEnumVARIANT = tmp.m_pIEnumVARIANT;
+ tmp.m_pIEnumVARIANT = 0;
+ }
+
+ /**
+ * Implements java.util.Enumeration
+ */
+ public boolean hasMoreElements()
+ {
+ {
+ if(m_recBuf[0] == null)
+ {
+ if(this.Next(m_recBuf) <= 0)
+ return false;
+ }
+ return true;
+ }
+ }
+
+ /**
+ * Implements java.util.Enumeration
+ */
+ public Object nextElement()
+ {
+ Object last = m_recBuf[0];
+ if(last == null)
+ {
+ if(this.Next(m_recBuf) <= 0)
+ throw new java.util.NoSuchElementException();
+ last = m_recBuf[0];
+ }
+ m_recBuf[0] = null;
+ return last;
+ }
+
+ /**
+ * Get next element in collection or null if at end
+ */
+ public Variant Next()
+ {
+ if (hasMoreElements()) return (Variant)nextElement();
+ return null;
+ }
+
+ public native int Next(Variant[] receiverArray);
+
+ public native void Skip(int count);
+
+ public native void Reset();
+
+ public native void release();
+
+ protected void finalize()
+ {
+ //System.out.println("EnumVariant finalize start");
+ if (m_pIEnumVARIANT != 0) this.release();
+ //System.out.println("EnumVariant finalize end");
+ }
+}
diff --git a/jacob/com/jacob/com/JacobObject.java b/jacob/com/jacob/com/JacobObject.java
new file mode 100644
index 0000000..4685eb4
--- /dev/null
+++ b/jacob/com/jacob/com/JacobObject.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+/**
+ * All COM object created by JACOB extend this class so that
+ * we can automatically release them when the thread is detached from
+ * COM - if we leave it to the finalizer it will call the release from
+ * another thread, which may result in a segmentation violation.
+ */
+public class JacobObject
+{
+ public JacobObject()
+ {
+ ROT.addObject(this);
+ }
+
+ public void release() {}
+}
diff --git a/jacob/com/jacob/com/MainSTA.java b/jacob/com/jacob/com/MainSTA.java
new file mode 100644
index 0000000..b1e4c79
--- /dev/null
+++ b/jacob/com/jacob/com/MainSTA.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+/**
+ * We provide our own main sta thread to avoid COM tagging a random
+ * thread as the main STA - this is the thread in which all Apartment
+ * threaded components will be created if the client chooses an MTA
+ * threading model for the java side of the app.
+ */
+public class MainSTA extends STA
+{
+ static {
+ System.loadLibrary("jacob");
+ }
+}
diff --git a/jacob/com/jacob/com/ROT.java b/jacob/com/jacob/com/ROT.java
new file mode 100644
index 0000000..ac7704d
--- /dev/null
+++ b/jacob/com/jacob/com/ROT.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+import java.util.Hashtable;
+import java.util.Vector;
+
+/**
+ * The Running Object Table (ROT) maps each thread to a vector of
+ * all the JacobObjects that were created in that thread. It always
+ * operates on the current thread so all the methods are static and
+ * they implicitly get the current thread.
+ * Conceptually, this is similar to the ThreadLocal class of Java 1.2
+ * but we are also supporting Java 1.6
+ * The clearObjects method is used to release all the COM objects
+ * created by Jacob in the current thread prior to uninitializing COM
+ * for that thread. If we leave this job to the garbage collector,
+ * then finalize might get called from a separate thread which is not
+ * initialized for COM, and also the component itself may have been
+ * freed.
+ */
+public abstract class ROT
+{
+ private static Hashtable rot = new Hashtable();
+
+ protected static void addThread()
+ {
+ String t_name = Thread.currentThread().getName();
+ if (rot.contains(t_name)) return;
+ Vector v = new Vector();
+ rot.put(t_name, v);
+ }
+
+ protected static void clearObjects()
+ {
+ String t_name = Thread.currentThread().getName();
+ Vector v = (Vector)rot.get(t_name);
+ if (v != null)
+ {
+ while (!v.isEmpty())
+ {
+ JacobObject o = (JacobObject)v.elementAt(0);
+ //System.out.println(t_name + " release:"+o+"->"+o.getClass().getName());
+ if (o != null) o.release();
+ v.removeElementAt(0);
+ }
+ rot.remove(t_name);
+ }
+ }
+
+ protected static void addObject(JacobObject o)
+ {
+ String t_name = Thread.currentThread().getName();
+ //System.out.println(t_name + " add:"+o+"->"+o.getClass().getName());
+ Vector v = (Vector)rot.get(t_name);
+ if (v == null)
+ {
+ // this thread has not been initialized as a COM thread
+ // so make it part of MTA for backwards compatibility
+ ComThread.InitMTA(false);
+ addThread();
+ v = (Vector)rot.get(t_name);
+ }
+ if (v != null)
+ {
+ v.addElement(o);
+ }
+ }
+
+ static {
+ System.loadLibrary("jacob");
+ }
+}
diff --git a/jacob/com/jacob/com/STA.java b/jacob/com/jacob/com/STA.java
new file mode 100644
index 0000000..08fb89d
--- /dev/null
+++ b/jacob/com/jacob/com/STA.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+/**
+ * A class that implements a Single Threaded Apartment.
+ * Users will subclass this and override OnInit() and OnQuit()
+ * where they will create and destroy a COM component that wants to
+ * run in an STA other than the main STA.
+ */
+public class STA extends Thread
+{
+ public int threadID;
+
+ public STA()
+ {
+ start(); // start the thread
+ }
+
+ public void run()
+ {
+ // init COM
+ ComThread.InitSTA();
+ if (OnInit())
+ {
+ // this call blocks in the win32 message loop
+ // until quitMessagePump is called
+ doMessagePump();
+ }
+ OnQuit();
+ // uninit COM
+ ComThread.Release();
+ }
+
+ /**
+ * Override this method to create and initialize any COM
+ * component that you want to run in this thread. If anything
+ * fails, return false to terminate the thread.
+ */
+ public boolean OnInit()
+ {
+ return true;
+ }
+
+ /**
+ * Override this method to destroy any resource
+ * before the thread exits and COM in uninitialized
+ */
+ public void OnQuit()
+ {
+ }
+
+ public void quit()
+ {
+ quitMessagePump();
+ }
+
+ /**
+ * run a message pump for the main STA
+ */
+ public native void doMessagePump();
+
+ /**
+ * quit message pump for the main STA
+ */
+ public native void quitMessagePump();
+
+ static {
+ System.loadLibrary("jacob");
+ }
+}
diff --git a/jacob/com/jacob/com/SafeArray.java b/jacob/com/jacob/com/SafeArray.java
new file mode 100644
index 0000000..dc561aa
--- /dev/null
+++ b/jacob/com/jacob/com/SafeArray.java
@@ -0,0 +1,247 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+public class SafeArray extends JacobObject
+{
+ int m_pV = 0;
+
+ public SafeArray() {}
+
+ public SafeArray(int vt)
+ {
+ init(vt, new int[] {0}, new int[] {-1});
+ }
+
+ public SafeArray(int vt,int celems)
+ {
+ init(vt, new int[] {0}, new int[] {celems});
+ }
+
+ public SafeArray(int vt,int celems1,int celems2)
+ {
+ init(vt, new int[] {0,0}, new int[] {celems1, celems2});
+ }
+
+ public SafeArray(int vt,int lbounds[],int celems[])
+ {
+ init(vt, lbounds, celems);
+ }
+
+ // convert a string to a VT_UI1 array
+ public SafeArray(String s)
+ {
+ char[] ca = s.toCharArray();
+ init(Variant.VariantByte, new int[] {0}, new int[] {ca.length});
+ fromCharArray(ca);
+ }
+
+ protected native void init(int vt, int lbounds[], int celems[]);
+
+ // not impl
+ public int getNumLocks() { return 0; }
+
+ // convert a VT_UI1 array to string
+ public String asString()
+ {
+ if (getvt() != Variant.VariantByte) return null;
+ char ja[] = toCharArray();
+ return new String(ja);
+ }
+
+
+ public native Object clone();
+ // call this to explicitly release the com object before gc
+
+ public void release()
+ {
+ destroy();
+ }
+
+ public native void destroy();
+ public native int getvt();
+ protected void finalize()
+ {
+ //System.out.println("SafeArray finalize start");
+ if (m_pV != 0) release();
+ //System.out.println("SafeArray finalize end");
+ }
+ public native void reinit(SafeArray sa);
+ public native void reinterpretType(int vt);
+
+ public native int getLBound();
+ public native int getLBound(int dim);
+ public native int getUBound();
+ public native int getUBound(int dim);
+
+ public native int getNumDim();
+ public native int getFeatures();
+ public native int getElemSize();
+
+ public native void fromCharArray(char ja[]);
+ public native void fromIntArray(int ja[]);
+ public native void fromShortArray(short ja[]);
+ public native void fromDoubleArray(double ja[]);
+ public native void fromStringArray(String ja[]);
+ public native void fromByteArray(byte ja[]);
+ public native void fromFloatArray(float ja[]);
+ public native void fromBooleanArray(boolean ja[]);
+ public native void fromVariantArray(Variant ja[]);
+
+ public native char[] toCharArray();
+ public native int[] toIntArray();
+ public native short[] toShortArray();
+ public native double[] toDoubleArray();
+ public native String[] toStringArray();
+ public native byte[] toByteArray();
+ public native float[] toFloatArray();
+ public native boolean[] toBooleanArray();
+ public native Variant[] toVariantArray();
+
+ // char access
+ public native char getChar(int sa_idx);
+ public native char getChar(int sa_idx1, int sa_idx2);
+ public native void setChar(int sa_idx, char c);
+ public native void setChar(int sa_idx1, int sa_idx2, char c);
+ public native void getChars(int sa_idx, int nelems, char ja[], int ja_start);
+ public native void setChars(int sa_idx, int nelems, char ja[], int ja_start);
+
+ // int access
+ public native int getInt(int sa_idx);
+ public native int getInt(int sa_idx1, int sa_idx2);
+ public native void setInt(int sa_idx, int c);
+ public native void setInt(int sa_idx1, int sa_idx2, int c);
+ public native void getInts(int sa_idx, int nelems, int ja[], int ja_start);
+ public native void setInts(int sa_idx, int nelems, int ja[], int ja_start);
+
+ // short access
+ public native short getShort(int sa_idx);
+ public native short getShort(int sa_idx1, int sa_idx2);
+ public native void setShort(int sa_idx, short c);
+ public native void setShort(int sa_idx1, int sa_idx2, short c);
+ public native void getShorts(int sa_idx, int nelems, short ja[], int ja_start);
+ public native void setShorts(int sa_idx, int nelems, short ja[], int ja_start);
+
+ // double access
+ public native double getDouble(int sa_idx);
+ public native double getDouble(int sa_idx1, int sa_idx2);
+ public native void setDouble(int sa_idx, double c);
+ public native void setDouble(int sa_idx1, int sa_idx2, double c);
+ public native void getDoubles(int sa_idx, int nelems, double ja[], int ja_start);
+ public native void setDoubles(int sa_idx, int nelems, double ja[], int ja_start);
+
+ // string access
+ public native String getString(int sa_idx);
+ public native String getString(int sa_idx1, int sa_idx2);
+ public native void setString(int sa_idx, String c);
+ public native void setString(int sa_idx1, int sa_idx2, String c);
+ public native void getStrings(int sa_idx, int nelems, String ja[], int ja_start);
+ public native void setStrings(int sa_idx, int nelems, String ja[], int ja_start);
+
+ // byte access
+ public native byte getByte(int sa_idx);
+ public native byte getByte(int sa_idx1, int sa_idx2);
+ public native void setByte(int sa_idx, byte c);
+ public native void setByte(int sa_idx1, int sa_idx2, byte c);
+ public native void getBytes(int sa_idx, int nelems, byte ja[], int ja_start);
+ public native void setBytes(int sa_idx, int nelems, byte ja[], int ja_start);
+
+ // float access
+ public native float getFloat(int sa_idx);
+ public native float getFloat(int sa_idx1, int sa_idx2);
+ public native void setFloat(int sa_idx, float c);
+ public native void setFloat(int sa_idx1, int sa_idx2, float c);
+ public native void getFloats(int sa_idx, int nelems, float ja[], int ja_start);
+ public native void setFloats(int sa_idx, int nelems, float ja[], int ja_start);
+
+ // boolean access
+ public native boolean getBoolean(int sa_idx);
+ public native boolean getBoolean(int sa_idx1, int sa_idx2);
+ public native void setBoolean(int sa_idx, boolean c);
+ public native void setBoolean(int sa_idx1, int sa_idx2, boolean c);
+ public native void getBooleans(int sa_idx, int nelems, boolean ja[], int ja_start);
+ public native void setBooleans(int sa_idx, int nelems, boolean ja[], int ja_start);
+
+ // variant access
+ public native Variant getVariant(int sa_idx);
+ public native Variant getVariant(int sa_idx1, int sa_idx2);
+ public native void setVariant(int sa_idx, Variant c);
+ public native void setVariant(int sa_idx1, int sa_idx2, Variant c);
+ public native void getVariants(int sa_idx, int nelems, Variant ja[], int ja_start);
+ public native void setVariants(int sa_idx, int nelems, Variant ja[], int ja_start);
+
+ public String toString()
+ {
+ String s = "";
+ int ndim = getNumDim();
+ if (ndim == 1)
+ {
+ int ldim = getLBound();
+ int udim = getUBound();
+ for (int i = ldim; i <= udim; i++)
+ {
+ Variant v = getVariant(i);
+
+ if (((v.getvt() & Variant.VariantTypeMask) | Variant.VariantArray) == v.getvt())
+ {
+ return s + "[" + v.toSafeArray().toString() + "]";
+ }
+ else
+ {
+ s += " " + v.toString();
+ }
+ }
+ }
+ else if (ndim == 2)
+ {
+ int ldim1 = getLBound(1);
+ int udim1 = getUBound(1);
+
+ int ldim2 = getLBound(2);
+ int udim2 = getUBound(2);
+
+ for (int i = ldim1; i <= udim1; i++)
+ {
+ for (int j = ldim2; j <= udim2; j++)
+ {
+ Variant v = getVariant(i, j);
+ s += " " + v.toString();
+ }
+ s += "\n";
+ }
+ }
+ return s;
+ }
+
+ static {
+ System.loadLibrary("jacob");
+ }
+
+}
diff --git a/jacob/com/jacob/com/Variant.java b/jacob/com/jacob/com/Variant.java
new file mode 100644
index 0000000..d779fc7
--- /dev/null
+++ b/jacob/com/jacob/com/Variant.java
@@ -0,0 +1,368 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+public class Variant extends JacobObject implements java.io.Serializable
+{
+ int m_pVariant = 0;
+
+ public static final short VariantEmpty = 0;
+ public static final short VariantNull = 1;
+ public static final short VariantShort = 2;
+ public static final short VariantInt = 3;
+ public static final short VariantFloat = 4;
+ public static final short VariantDouble = 5;
+ public static final short VariantCurrency = 6;
+ public static final short VariantDate = 7;
+ public static final short VariantString = 8;
+ public static final short VariantDispatch = 9;
+ public static final short VariantError = 10;
+ public static final short VariantBoolean = 11;
+ public static final short VariantVariant = 12;
+ public static final short VariantObject = 13;
+ public static final short VariantByte = 17;
+ public static final short VariantTypeMask = 4095;
+ public static final short VariantArray = 8192;
+ public static final short VariantByref = 16384;
+
+ public native int toInt();
+ public native double toDate();
+ public native boolean toBoolean();
+ public native EnumVariant toEnumVariant();
+
+ public native void getNull();
+ public native void putNull();
+
+ public native Variant cloneIndirect();
+ public native double toDouble();
+ public native long toCurrency();
+
+ // superceded by SafeArray
+ public void putVariantArray(Variant[] in)
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ // superceded by SafeArray
+ public Variant[] getVariantArray()
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ // superceded by SafeArray
+ public void putByteArray(Object in)
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ public native void putShortRef(short in);
+ public native void putIntRef(int in);
+ public native void putDoubleRef(double in);
+ public native void putDateRef(double in);
+ public native void putStringRef(String in);
+ public native short getShortRef();
+ public native int getIntRef();
+ public native void putShort(short in);
+ public native short getShort();
+ public native double getDoubleRef();
+ public native double getDateRef();
+ public native String getStringRef();
+
+ // superceded by SafeArray
+ public Object toCharArray()
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ public native void VariantClear();
+ public native Dispatch toDispatch();
+ public native Object clone();
+ public native String toString();
+ public native int getInt();
+ public native double getDate();
+ public native void putInt(int in);
+ public native void putDate(double in);
+ public native byte toByte();
+
+ public Object getDispatch() { return toDispatch(); }
+ public void putDispatch(Object in) { putObject(in); }
+
+ public native boolean getBoolean();
+ public native byte getByte();
+ public native void putBoolean(boolean in);
+ public native void putByte(byte in);
+ public native int toError();
+
+ public Object toObject()
+ {
+ return toDispatch();
+ }
+
+ public native void getEmpty();
+ public native void putEmpty();
+ public native int getError();
+ public native void putError(int in);
+ public native double getDouble();
+ public Object getObject()
+ {
+ return toDispatch();
+ }
+
+ public native void putCurrency(long in);
+
+ public native void putObject(Object in);
+
+ public native void putDouble(double in);
+ public native long getCurrency();
+ public native void putFloatRef(float in);
+ public native void putCurrencyRef(long in);
+ public native void putErrorRef(int in);
+ public native void putBooleanRef(boolean in);
+
+ public void putObjectRef(Object in)
+ {
+ putObject(in);
+ }
+
+ public native void putByteRef(byte in);
+ public native String getString();
+ public native void putString(String in);
+ public native float getFloatRef();
+ public native long getCurrencyRef();
+ public native int getErrorRef();
+ public native boolean getBooleanRef();
+ public native Object getObjectRef();
+ public native byte getByteRef();
+ public native float toFloat();
+
+ /**
+ * By default toSafeArray makes a deep copy due to the fact
+ * that this Variant owns the embedded SafeArray and will
+ * destroy it when it gc's
+ */
+ public SafeArray toSafeArray()
+ {
+ return toSafeArray(true);
+ }
+
+ public native SafeArray toSafeArray(boolean deepCopy);
+ public native void putSafeArrayRef(SafeArray in);
+ public native void putSafeArray(SafeArray in);
+
+ public native void noParam();
+
+ // superceded by SafeArray
+ public void putCharArray(Object in)
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ public native float getFloat();
+ public native void putFloat(float in);
+
+ public void putDispatchRef(Object in) { putDispatch(in); }
+ public Object getDispatchRef() { return getDispatch(); }
+
+ // superceded by SafeArray
+ public void putVariantArrayRef(Variant[] in)
+ {
+ throw new ClassCastException("Not implemented");
+ }
+
+ // superceded by SafeArray
+ public Variant[] getVariantArrayRef()
+ {
+ throw new ClassCastException("Not implemented");
+ }
+
+ public native void changeType(short in);
+
+ public void changeType(int in)
+ {
+ changeType((short)in);
+ }
+
+ public Object toScriptObject() { return toDispatch(); }
+
+ public Variant()
+ {
+ init();
+ putEmpty();
+ }
+
+ public Variant(int in)
+ {
+ init();
+ putInt(in);
+ }
+
+ public Variant(double in)
+ {
+ init();
+ putDouble(in);
+ }
+
+ public Variant(boolean in)
+ {
+ init();
+ putBoolean(in);
+ }
+
+ public Variant(String in)
+ {
+ init();
+ putString(in);
+ }
+
+ public Variant(SafeArray in,boolean fByRef)
+ {
+ init();
+ if (fByRef) {
+ putSafeArrayRef(in);
+ } else {
+ putSafeArray(in);
+ }
+ }
+
+ public Variant(Object in)
+ {
+ this(in, false);
+ }
+
+ public Variant(Object o,boolean fByRef)
+ {
+ init();
+ if (o == null) {
+ putEmpty();
+ } else if (o instanceof Integer) {
+ if (fByRef) putIntRef(((Integer)o).intValue());
+ else putInt(((Integer)o).intValue());
+ } else if (o instanceof String) {
+ if (fByRef) putStringRef((String)o);
+ else putString((String)o);
+ } else if (o instanceof Boolean) {
+ if (fByRef) putBooleanRef(((Boolean)o).booleanValue());
+ else putBoolean(((Boolean)o).booleanValue());
+ } else if (o instanceof Double) {
+ if (fByRef) putDoubleRef(((Double)o).doubleValue());
+ else putDouble(((Double)o).doubleValue());
+ } else if (o instanceof Float) {
+ if (fByRef) putFloatRef(((Float)o).floatValue());
+ else putFloat(((Float)o).floatValue());
+ } else if (o instanceof SafeArray) {
+ if (fByRef) putSafeArrayRef((SafeArray)o);
+ else putSafeArray((SafeArray)o);
+ } else {
+ if (fByRef) putObjectRef(o); else putObject(o);
+ }
+ }
+
+ //weird constructors
+ public Variant(int in,int in1)
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ public Variant(int in,boolean in1)
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ public Variant(int in,double in1)
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ public Variant(int in,Object in1)
+ {
+ throw new ComFailException("Not implemented");
+ }
+
+ public native short getvt();
+ public native short toShort();
+
+ // call this to explicitly release the com object before gc
+ public native void release();
+
+ protected native void init();
+
+ protected void finalize()
+ {
+ //System.out.println("Variant finalize start:"+m_pVariant);
+ if (m_pVariant != 0) release();
+ //System.out.println("Variant finalize end");
+ }
+
+
+ // superceded by SafeArray
+ public Variant[] toVariantArray()
+ {
+ throw new ClassCastException("Not implemented");
+ }
+
+ // superceded by SafeArray
+ public Object toByteArray()
+ {
+ throw new ClassCastException("Not implemented");
+ }
+
+ static {
+ System.loadLibrary("jacob");
+ }
+
+ // serialization support
+ private void writeObject(java.io.ObjectOutputStream oos)
+ {
+ try {
+ Save(oos);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream ois)
+ {
+ try {
+ Load(ois);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+
+ // is the variant null or empty or error or null disp
+ public native boolean isNull();
+
+ public native void Save(java.io.OutputStream os)
+ throws java.io.IOException;
+
+ public native void Load(java.io.InputStream is)
+ throws java.io.IOException;
+
+}
diff --git a/jacob/com/jacob/com/WrongThreadException.java b/jacob/com/jacob/com/WrongThreadException.java
new file mode 100644
index 0000000..4b79b7f
--- /dev/null
+++ b/jacob/com/jacob/com/WrongThreadException.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 1999-2004 Sourceforge JACOB Project.
+ * All rights reserved. Originator: Dan Adler (http://danadler.com).
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Redistributions in any form must be accompanied by information on
+ * how to obtain complete source code for the JACOB software.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.jacob.com;
+
+public class WrongThreadException extends RuntimeException
+{
+ // Constructors
+ public WrongThreadException() { super(); }
+ public WrongThreadException(String s) { super(s); }
+}
diff --git a/jacob/jacob.dll b/jacob/jacob.dll
new file mode 100644
index 0000000000000000000000000000000000000000..1f539b97c3e655ee9da21a3155e1479aeff09781
GIT binary patch
literal 94208
zcmeEPe|%Kcm4B1GBm+z`0}L=~ltBlZO0=m7HaI~CVM0KHGZ|*aR3LWMbWClvIzy?O
zVCW=mCYMok?Y7-@x3X%hZhyF4YtdRw3=&XOeproyUF=eQ=|qhM!yu8j-*fMKGjEb0
zY}-HO^C9zo+%sziEx
z(o1u;npV6tXI13J+nl%Ddh=Ir{mR#!*L~$1-?%yI{D&Kyx5mEVyzv{(C07NUU%&bK
z8!jp?p6t>c)H{v{PNl+dSK(%xF>$mKmAu~$9t`nJpKkZ{9gYRx6Wdd^w?ZU@)eq-^}O6k
z{@h}c9K|Pj_o{81Rqs3aL--AAzxdJrIVI`Zi*CLCE77k=((a4t
zDFAx3U;5GhdGPciQB11201rJV=hS}jqyO_rQqM)V-f+{+*GUqjMUp@pZ~I#O8vc1C
z=?cT`XP2LG;4=<<#(~c`@EHd_2Reao{r!e8z##IPiDmKp@1TE=xFat;b{w
zu|n17U?nUasl#o=gFoSrdUprfV*_l7%ih@&E7)3r$84rAq~3EMX1YE+FZBh&A!RBR
zD~WHjTO9TRFMPWouyg!_54r!KeD8^b-GqY>0Vnz~aMj<^JRb+1;0z
zov1ZO3z-?EWahQAdPg$kNUXId)>g4K=0qOzmi8B}H<@gSxCay3uuPaeo&b*ey
zatjNVv-+|`s4TIvf=%}Y)P_~bP<5i##-=m`)Vps&up_L__@M+EYR$=zr6I&y0%_Jw
z4-f^lWxWUUd`f##lH%LsL~RwLx&Y*FP1M@)x>D`zNwk$)?~GINP&t#I!UJzv)a_Ge
z+zY_TB~o6(>x%c}yGE5O0SEX2CpOw5wMf2ji|VI~?M0G0V>98=&)Uk_N;{h#xfiVU
z`2*@boaHO40txv^HeGF4f@YVx(`dEz&Xm;`=|H)F;yIzJ@og6Hud_#Em^pdF5w;z?
zU-MjZ&}
zf79CW^#R}9k7ANk+4G!PqV{a!eyhnNwLfPY(_nnajJ^izS;!)Kv4Qj7!D_1^C$dl6
z+6ZqJvNiaaS@mBH@Y$H&eoYheIY9h
zsXp`C_%^d9s2abB-ca~S3i~{}6*9<%EBB%u%i*6!FADI-$=e-xxc~4^uZfnjVNvp7
zl&tJQnaNFC^T3w1&sik4!ewtrOl5hhPj0I0p+{(AD}r$C&p9$&iw{{q-Ayh>C|s$s
zU|D64`}IVt%eLV{R$qa>b1nE{)b5G*%I@b{k2I}aQ`vJ3MB+J@#OkYIW3EH3WRh&~a4-<={-nul$lw
zSmmmN&R~=CU-Cl+ccU9aVFHO#<$m7OR)7r=TD*r=$KSIp#a%@m+Np^B2bkl;tqbKH
zENJslL4Si!p}-aUdUbr8jnzv*)o(ZQ0N1=DG-m0e;iUTNZi;o1B#80C&;zUxy3yCl
zN+Pd&uU(1_QXn2XGfw9_s=!#LJnG
zcj%q~uzDO=t$~K1(Ykpv$0tY#*}~AmFaQ%G)M8_b@^wH19F_+BLx9g_hJ!jpFqA{Y
z_(p>;B>?CPDKBvqWd=3SQPz$l;9?*c_Ce@eEt0=~iK`q>BxUq_z;hs=Od)(q
z7w$-$OB;N_kWzY#%d<1U6hCf%_X%!SxvIhqxOogW@og1NYpx+ZBF1+><25A60h{@A
zDnCFyyg#<&QzVM>|Gn=D{tpCn{)3lVk9O|2cI*H_tS}Pc6l;cj1#WT;`OHWie}+Hd
z5K}ZhaB8dYjA-SE2tHt_61{#jq*SCiab-*)>i&UR1B>asgCw7N0v&7fM)E>F;ifH0B&a5vFPBMa}L
zkHJlgFRV0Clf%T#k?8D}{1zz`QfIhKCLqu@(-&zcl9kCvxz*$<*9=o&hFRl7fh&O=
zc-93AM{}Cs-vPT>BK*|9vG+Fc6NFJaV6p6PBo(R>z`D(ab?*BN;9t(PobXapg7D@~qB)kk>HB^{{{fFTMBaco9VB~0{PSFFKZ4w2(Uq(
zH139#r;g~%sN7443g1Q-D(Wwtz8=yQdiQJewdAQYBH(Z{#*M8xLGy
z^wm#bXkPmOduedp0ofj)=W*&16
za;Rp&uQyYk@GB7by+!1Rv51SD@^|NyFFJX7QvYVC|7$Z9&PN0Aj%J70EoN5Y7k$Mp
zVY7UpuzJrXNXgnJGzSI78_kku#CK{29JyB{lqgK}2pVK=AuVm^;1UeZ4uf1tlHr~K5Dm(SS4s|@&_nhZ&4#P)c4A}?+FrgBP3AC;FE#>!C$icaAe_674W+<
zP<xr_i}3dPd?fbwAxtRu9Ajl5;(o3pfOV{?DeBq{MNGn*Mw8)TX(
zT3{|CQ9utUyHXl-dTNkQ;>STKDSbQ|##h0q#+No8wovsQ#G##0Yjb=-Aq?IkGxJ-}
zTa`VPdwHkn{l&+>p}mv(L-NG_PyqN=P<=7^ik5}KFy*A=b;syQ%8p4!;RL4-Kh)IR
zpI_)nEH;B1x@(jf54yY^{2)ueQ64-e(MOLN%Im{Z_XoS7!baXaYp-w#r(}r8q2EwH
zL%&J5byUBLyveDVsu_HBds%_{LLlcrL7QV|k-3DJjZyVErgDt`_8yd-W&smzW^2c@
z;8|9T_*COG+_-mPX+On{Gq3+Ux^Zwk;inav;p!P3xBz_aiQG1w-w+oQSL~#($$ycB
zKk^3oFK-mw59^pCpNNB?%FA3=QI*f3N}(s_Bo>E-Xu)YY{1Ata_+b+d5ePv?pKw^z
zVTSfMW`Gp~*ksRy3d&I4pD9oHP7(Na6TSu$V<@51?xF0YAG10Vc!z
zC^O&smv_0w5Io{;!yASKFb>zcg9u_n2iVuRSBGyn>?@Zw!M)(3hDX
z-;WA9XASyOK8Zd3W(K|$3f9tq2_F1(3Vs--Tn2m=Wy%*eGYM#CXHkMy`b*_A@@+LB
zG`l4)N4{re;y;H3(*TY9issyilA-PbT9h2(J6#h{JsiCnF-chU$T9P*$#E@ctqG>Op@vNjp
zY5>#+`NSMSPPtM|RnnxHrrhbJN%?XyRd?MA$=(+BwWye=w@3&GU^0!AWHC2yGqZXG
z+yj1uXCDTrWN?V2{Ce~?;!|_Z{VuWX96Q(8i%s8U2V=ax8yyH~veAOYj5>!{
z>gK_);Y936vgX&|CHZ9(X$)g*iK|ML2JJ|q&1SvxeiT4AB)n-}KTK=okJF$C*-`c}tusBub};V|EH!oZ9DZ=aI?`TVVkKgHIjpb?R)CE##ROHr6R-&w+k?k{
z`2~C7DgpKdmQM><53+hQi`o65fKXy=I<6X4qhldi9(QlTYisQWfypExi8KJE=?}Vk
z8q>v8^PXMAIk03(0|`aK>rn4rf#@cBaSZ(+V~mVs?cK(qIufo9*DCzb!ouUOt8qoK
z**z5QRY-fhm$=DgixpEKf8#bPPwUI~xgu0^lj|n@bnZ`JK__}0mtc$zp}lC42cU03
z0eD?OzBi;(fMGwQU<#nX%r<7sxRy#+;B9=J=d^wG6Ai$`s)5qZPwC
zWjC}C*wlrVaPO+@iEp#J2Y_Y;R{hisp7`fZ
zNED$SyVunYWW#KrA(U86Yn~PeRO*W~e??zbW3d^lwzw*5Kv4qY2k`QM7>E8KWe*Ji
zGaIdLBBHPi%x_(S=z|>$7o7&dGVuHtT;rMpP$k53u%2e%V_Cl%0MUh@jvOZ%+MWB`
zngEguAao|dKmSW*>0daN1@1ESD@+?g@xz(gAol%Q8ge~}i0XVPNI
zsxf5mK##96qzr&?8N+hnBzW3kYv(gW7sVuMX~8W&r0!-&-BD&jSlCK48}KVr=u&|K
zVxI`jw2U3s6;i9qb#%|Ne4(Cjm3(}1I{=21e~O?|IuyBj35EY6U&9^94Z
zFX3pT-(^J7`zm`#OyWZbDMVdmK(LI)7N7aCg*1#X7R-M2bv`9jUk9LadP2ADyPW=p
zW*VqS&v9t_F6wduhyx>x=XM~844u~ZDfuC}6hMbUL-U*$o?Jqmwp@N;wiCIzPWPOfPDu)wGv3f&b?gQBl%<
z)CgptEJ$+?{$M5)ngd8Rv_jKjZRQQ0<06*1?GzI={zDvyJA-l66uSV;k(w_>W>p@3
zZLpbU^ofj~kp1BX2ojjm1dH1jNXnm(Y=wNv(dz{h2Y|2(5L~F~46+yJ?S`*Wo`>YV
z#EmkGj3z!G?=`QC4XpvTjzAbJCTIaRtURhg*uM4}4%~>J!C%FwxHFrM60OPjugC{&
z_l!v+Ayemk4fZYFVj_+DDr#l|DrWQ*#c8mh$K{74)IzL!pAssxbOpetuFd8f8RaRA
z#1w7|!phKf=me3!#3d{@e+dlH$HyMw6=QrjAmlXH6GDa(b7|@fbaL08h!2KP0cVQ=
z-o^~P85~}V2@q{0wt%PuGnDsd%2V!|h1a2!woDZZwV$&ZoD<)hnyGJS&vNqi-iDV5
zSs{9J+RIcqMSEK^^(O;MGaAx~G6;xHUl`HMTTnsoy;3X$&X7>2awOc$zJ)9XnK0d+
z6D$TCy*{dcF{iyzXsDC47axNBVt~6~e?}<jv6*AOX)nh-bs@yVj``1wBd7zQ_T-8SF&7DF6A?aNP-mpY
z%W_f{z^{r~5l-=8308(?TDwN4-_T!vO<~h&26ZV@o*_rFQgy%IdLgie&A}TINlqc%
zaCw1MKm)dUyKCJaC0l2iHtZ8dw9(*;P&3q@#{OANlZ0{o^OHUQul`vo^u6exOT|sL
zf4F)d(?8zv{gY4qb3OG>PWO!K9T~mz7K)XpzSO)hUy98c+Y{`i!w-QiI`309h~2Ba
z^IqA_$--zO(^W+R`*#B>Z!*l>XS9%VOIxUzeAgEgS^i5r+=I~yh+
zorW4lS{mHMLkH=HX