I am trying call com object method signature:
Com object method signature as mentioned below:
HRESULT callAuthen( BSTR pwcUsercode, BSTR pwcPassword, BSTR pwcDomain, BSTR pwcServerIdent, UINT uiAuthType, byte *ppbInitialRequest,
From Java if i am trying to call as mentioned below:
Variant v = Dispatch.call(mf, "callAuthen", new Variant("user"),
new Variant("password"), new Variant("hostname"), new Variant(""), new Variant(0));
SafeArray bba = new SafeArray(Variant.VariantByte,4);
Variant v1 = new Variant(bba , true);
Variant v2 = new Variant(true);
Dispatch.call(mf, "callAuthen", new Variant("UGSI"), new Variant("UGSI"),
new Variant("TRPROGD"), new Variant(""), new Variant(uiAuthType),v1,v2);
In both approaches It is throwing following exception:
com.jacob.com.ComFailException: A COM exception has been encountered:
At Invoke of: callAuthen
Description: Bad variable type.
at com.jacob.com.Dispatch.invokev(Native Method)
I am able to load teh ActiveXComponent sucessfully
Please please help, this is an high priority task.
Thanks in advance
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.