|
|
|
Talking To COM
However
platform bound COM is there is a lot of data which is best accessed by talking
to COM. Talking to COM is straightforward in Visual Basic
and much harder in C++ The object in Java is to make
it as easy for Java to talk to COM as it is for
Visual Basic. This will involve a few native functions and
a lot of code generation. This page points at the slides of my talk and the
sources for the code I present.
Typelib
Reader Sources
The first step in talking to COM is
to read what files and interfaces are present. I developed a typelib reader
based on the jcom project.
Code Generator Sources Step Two is to develop a code generator which reads the XML file and generates Java code. I discuss code generation principles in the slides and will amplify my ideas on the subject later.
Excel
Demo Sources Step Three is to write
code to talk to the generated classes. The code is
simple and very similar to the VBCode. Note some com.lordjoe classes are used
by the generated code. Unzip NeededClasses.jar to find these sources. I have
written a document describing the use of the
generated code which is a useful reference. Also
the code requires a modified version of jacob.dll (included).
.
Home
Mail to: smlewis@LordJoe.com
(C) Copyright Steven Lewis, 1998.
Last updated: 11/23/98