Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interacting with a DLL COM (VC++)
Message
From
13/08/1999 09:15:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Interacting with a DLL COM (VC++)
Miscellaneous
Thread ID:
00253364
Message ID:
00253364
Views:
92
Hi,

I´m working with a DLL COM (VC++) witch has 2 methods that give me problems.
This is the definition of that methods in the dll (VC++ code):

[id(1), helpstring("method Open")] HRESULT Open(BSTR xlName, [out] short* xlHandle);

[id(7), helpstring("method Get")] HRESULT Get(short xlHandle, [out] VARIANT *xlValue, long xlRow, long xlCol, [out] BSTR *xlFont, [out] double *xlSize, [out] long *xlColor);

From my VFP application I’m doing this:

Obj = CreateObject(“Object”)

Name=”c:\file”
Handle=0
Obj.Open( Name, @Handle ) ß I get a type mismatch (OLE error code 0x80020005: Type mismatch) (the parameter @HAndle is a short* in the dll).

Value=space(20)
Font=space(20)
Size=0
Color=0
Obj.Get( Handle, @Value, 1, 1, @Font, @Size, @Color ) ß @Value (this parameter is a Variant* in the dll). I get the same error (OLE error code 0x80020005: Type mismatch).
ß @Size (this parameter is a double* in the dll) the same error (OLE error code 0x80020005: Type mismatch)

There’s no problem with long* and BSTR*.
Any idea about working with short*, double*, and variant* of VC++ from a VFP application?
Thanks.
Next
Reply
Map
View

Click here to load this message in the networking platform