Information générale
Titre:
Interacting with a DLL COM (VC++)
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.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement