Fixed broken sample

This commit is contained in:
clay_shooter
2005-11-13 13:32:22 +00:00
parent b1a83b02b2
commit c6cdf510eb
3 changed files with 19 additions and 6 deletions

View File

@@ -1,4 +1,4 @@
package com.jacob.samples.test;
package com.jacob.samples.test.MathProj;
import com.jacob.activeX.ActiveXComponent;
import com.jacob.com.*;
@@ -10,12 +10,20 @@ import com.jacob.com.*;
* -Djava.library.path=d:/jacob/release -Dcom.jacob.autogc=false -Dcom.jacob.debug=true
* </pre>
*/
class math {
class MathTest {
public static void main(String[] args) {
MathTest me = new MathTest();
me.runTest();
}
public MathTest(){
}
public void runTest(){
// deprecated
// System.runFinalizersOnExit(true);
Dispatch test = new ActiveXComponent("MathTest.Math");
testEvents te = new testEvents();
TestEvents te = new TestEvents();
DispatchEvents de = new DispatchEvents(test, te);
if (de == null) {
System.out
@@ -33,9 +41,8 @@ class math {
System.out.println("v.isNull=" + v.isNull());
System.out.println("v.toDispatch=" + v.toDispatch());
}
}
class testEvents {
public class TestEvents {
public void DoneAdd(Variant[] args) {
System.out.println("DoneAdd called in java");
}
@@ -44,3 +51,5 @@ class testEvents {
System.out.println("DoneMult called in java");
}
}
}

View File

@@ -1 +0,0 @@
A Simple VB COM DLL that exposes two methods and raises events.

View File

@@ -0,0 +1,5 @@
A Simple VB COM DLL that exposes two methods and raises events.
The dll must be registered with your system
Run --> regsvr32 <path>\com\jacob\samples\test\MathProj\MathTest.dll