I try to integrate Java application with Bartender Seagull ActiveX interface using jacob 1.19 library. I have a problem with print method because I do not know how to call this method from jacob. I tried following code:
public void print( String printJobName, Boolean waitForSpoolJobToComplete, Integer timeoutMs )
{
Variant args[] = new Variant[ 4 ];
args[ 0 ] = new Variant( printJobName );
args[ 1 ] = new Variant( waitForSpoolJobToComplete );
args[ 2 ] = new Variant( timeoutMs );
args[ 3 ] = new Variant();
args[ 3 ].putNoParam();
Variant ret = format.invoke( "Print", args );
}
where format is a .com.jacob.activeX.ActiveXComponent instance and I get exception:
A COM exception has been encountered: At Invoke of: Print Description: 80020005 / Type mismatch.
I think that Messages argument causes this exception. How to pass this argument?