Hi ,

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,
UINT uiOutputLength);
From Java if i am trying to call as mentioned below:
approach1:

Variant v = Dispatch.call(mf, "callAuthen", new Variant("user"),
new Variant("password"), new Variant("hostname"), new Variant(""), new Variant(0));

approach2:

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)
at com.jacob.com.Dispatch.call(Dispatch.java)
at com.unisys.multiface.AuthenticationSupport.main(AuthenticationSupport.java:44)
I am able to load teh ActiveXComponent sucessfully

Please please help, this is an high priority task.

Thanks in advance