Re: EuCOM : Attn Matt : String Return Value

new topic     » goto parent     » topic index » view thread      » older message » newer message

Rad wrote:
> 
> I used com_err_out( 1 ) and got following display:
> 
> 80020009: Exception occurred.
> Exception Source:
> Exception Description:
> 
> Hope number 80020009 gives some indication about exception as Source and
> Description
> are empty.

Unfortunately, that's just a generic message, "Hey, something went wrong!"
It's usually given when something bad happens that they didn't expect.
 
> I also tried:
> 
OCString = invoke( OC6, {OneCryptA_m_EncryptString, 1, 2},
                   {pBstrAppId, pBstrOCStr},
                   {VT_BSTR, VT_BSTR}, DISPATCH_METHOD )

> 
> but got the following error:
> 
> 8002000E: Invalid number of parameters.
> Exception Source:
> Exception Description:

Hmmm....One other way to try calling it:

OCString = invoke( OC6, {"EncryptString", "Key", "InString"},
                   {pBstrAppId, pBstrOCStr},
                   {VT_BSTR, VT_BSTR}, DISPATCH_METHOD )

This allows eucom to ask the COM object what it likes to call the
parameters.

If that doesn't work, then I'm not sure what else to try.  Is there any
sort of initialization that has to be done (license key, initialization
routine, etc)?

I suppose one other issue that I notice is that the name of the interface
ends with an 'A'.  In Win32, this usually denotes an ANSI string format.
COM objects are all supposed to use multi-byte strings (which is what 
a BSTR is).  Maybe they're really using ANSI strings?  You could try
passing a pointer to something from allocate_string() as a VT_I4.  That's
really a last ditch desperation attempt, though.

One thing I've done sometimes is to try to use an object using some other
language.  If you've got some part of MS Office, it's pretty easy to do (VBA).
Or you could try something else, like C# or VB.NET.  You can get free 
dev kits for those, unlike Office.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu