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

Reply via email to