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
COM SafeArray
Moderator: General Moderators
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)
);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?
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?