Lisp HUG Maillist Archive

Using VARIANT in COM

Hi,

I'm attempting to use a 3rd-party COM object from within Lisp.
I can get/put properties and (so far) invoke methods with fixed type
arguments.

I'm stuck at invoking a method with an "[in, optional] VARIANT" argument. 
When I supply a string to the method, just to fuzz it, I get:

  Error: "a-string" cannot be converted to 
  foreign-type (:STRUCT :TAG-VARIANT)

So I think I need to FLI:ALLOCATE-FOREIGN-OBJECT something, and use it as
the parameter, but I don't know what this something is. 

Hints appreciated. Cheers.

-- 
Ng Pheng Siong <ngps@netmemetic.com> 


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Re: Using VARIANT in COM

On Wed, Jul 16, 2003 at 12:30:34PM +0800, Ng Pheng Siong wrote:
> I'm attempting to use a 3rd-party COM object from within Lisp.
> [...]
> I'm stuck at invoking a method with an "[in, optional] VARIANT" argument. 

Following up to myself...

I was using CALL-COM-INTERFACE. Turns out if I use CALL-DISPATCH-METHOD, I
get automatic parameter marshalling and things Just Work.

So everything is happening fine now, including callbacks from COM to my
interface implementations written in Lisp.

I'm a happy bunny. ;-)

-- 
Ng Pheng Siong <ngps@netmemetic.com> 


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs Email
Security System. For more information on a proactive email security
service working around the clock, around the globe, visit
http://www.messagelabs.com
________________________________________________________________________

Updated at: 2020-12-10 08:59 UTC