Page 1 of 1
COM SafeArray
Posted: Tue Oct 15, 2002 11:38 am
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
Posted: Wed Oct 16, 2002 12:55 am
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)
);
Posted: Thu Oct 17, 2002 4:07 pm
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
Posted: Thu Oct 17, 2002 5:33 pm
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?
Posted: Fri Oct 18, 2002 8:37 am
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?