So let me answer my question.. You idiot, RTFM!!!
There is documentation on the use of Variants in the COM section. Lots of good support even for passing ByRef. An example of using a COM array is like this: $PSearchCriteria[0] = "THIS"; $PSearchCriteria[1] = "THAT"; $SearchCriteria = new Variant($PSearchCriteria, VT_ARRAY); Here is a result array passed by reference: $PResult = array(); $Result = new Variant($PResult, VT_ARRAY | VT_BYREF); There is no support for multi dimensioanl arrays Jeff On Thu, 28 Mar 2002 13:56:13 GMT, [EMAIL PROTECTED] (Jeff Bendixsen) wrote: >Hi > >I have an example in ASP calling a COM objectr that looks like this: > >... >redim vArray(1,1) >vArray(0,0)="Name1" >vArray(1,0)="Value1" >vArray(0,1)="Name2" >vArray(1,1)="Value2" >res=obj.SomeFunction(vArray,arrRes,CInt(100)) >... > >So far the authors will only tell me that they use Variant arrays. > >ofcousre it all starts off like: >$obj = new com("SynWeb.Application") or die("Error"); > if (is_object($obj)) { > $res = $obj->ConnectToRep($repository, $server); > ... > >Thats all fine and works. The problem comes with invoking this >function that takes 2 arrays, Variant array to be more precise. >I tried this: > >$SearchCriteria[0][0] = "Name1"; >$SearchCriteria[0][1] = "Value1"; >$SearchCriteria[1][0] = "Name2"; >$SearchCriteria[1][1] = "Value2"; >$Result = array(); >$res = $obj->SomeFunction($SearchCriteria, $Result, 10); > >or: > >$SearchCriteria[0][0] = "Name1"; >$SearchCriteria[1][0] = "Value1"; >$SearchCriteria[0][1] = "Name2"; >$SearchCriteria[1][1] = "Value2"; >$Result = array(); >$res = $obj->SomeFunction($SearchCriteria, $Result, 10); > >or: > >$SearchCriteria[0] = array("Name1" => "Value1"); >$Result = array(); >$res = $obj->SomeFunction($SearchCriteria, $Result, 10); > >I get: > >Warning: Invoke() failed: Exception occurred. > Source: SynWeb Description: Subscript out of range in >c:\apache\htdocs\myscript.php on line 22 > >plus about 50 other things I coulkd think of. Does anyone know if this >is possible with PHP and how? > >BTW the ASP code does work I have had it running. > >Jeff -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php