COM SafeArray

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
jadair
Forum Newbie
Posts: 9
Joined: Mon Sep 02, 2002 10:01 pm
Location: Sterling Heights, MI

COM SafeArray

Post by jadair »

I need to pass thru COM an array of doubles packaged within a Variant SafeArray. Is this possible? And how to do it in PHP, of course.

Link to the latest COM.c source code... http://chora.php.net/co.php/php4/ext/com/COM.c
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

only guessing

Code: Select all

$param = array(
	new Variant(1.0,VT_R8),
	new Variant(2.0,VT_R8),
	new Variant(3.0,VT_R8),
 	new Variant(4.0,VT_R8)
   );
jadair
Forum Newbie
Posts: 9
Joined: Mon Sep 02, 2002 10:01 pm
Location: Sterling Heights, MI

Post by jadair »

I spoke with one of the authors of COM and he has revised the VARIANT code to correctly handle this situation... it's sitting in CVS.

Does anyone know how long it takes to go from CVS to a stable-snap?

I know it takes about 8 hours to get from CVS to a latest-snap?

John Adair
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Does anyone know how long it takes to go from CVS to a stable-snap?
no, I don't know.

But what has been wrong?
jadair
Forum Newbie
Posts: 9
Joined: Mon Sep 02, 2002 10:01 pm
Location: Sterling Heights, MI

Post by jadair »

I needed the SafeArray to be of type: VT_ARRAY | VT_R8;

To paraphase from the author (because I don't completely understand the details): The code was producing a safearray of type VT_ARRAY|VT_VARIANT and each element of the array was of a variant structure of type VT_R8.

The following code should now work:
$foo = new VARIANT(array(1.0, 2.0, 3.0), VT_ARRAY|VT_R8);
$com->bar($foo);

Does anyone know how often a "stable" version is produced?
Post Reply