[plt-scheme] Re: MysterX and arrays/vectors

From: Paul A. Steckler (stecksoft at gmail.com)
Date: Wed Mar 5 15:36:39 EST 2008

On Sat, Mar 1, 2008 at 4:26 PM, Filipe Cabecinhas <filcab at gmail.com> wrote:
>  How can I create a double vector?

IIRC, the safe array code in MysterX wasn't particularly well-tested,
so the strategy of
always putting VARIANTs in the SAFEARRAY may have been ill-advised.

Here's what I'd suggest.  In plt/src/array.cxx, there's a function
In it, there's a call to marshalSchemeValueToVariant(), followed by a call to
SafeArrayPutElement().  You can write a function that pulls the COM value out
of the variant by dispatching on the vt (type) field, and pass that
value, rather
than the VARIANT, to SafeArrayPutElement().

-- Paul

Posted on the users mailing list.