ID: 10875
Updated by: phanto
Status: Open
Bug Type: COM related
Operating system: 
PHP Version: 4.0.5
Assigned To: 

> $jServer->GetB("NN", &$Var);

pass by reference is deprecated. you have to pack your value into a VARIANT object and 
unpack it afterwards.

$vVar = new VARIANT($Var);
/* VARIANT($Var [, VT_BSTR [,CP_ACP]]) */
$jServer->GetB("NN", $vVar);

echo $vVar->value;
echo $vVar->type;
/* one of VT_BSTR, VTUI4, VT_BYREF|VT_*, .... */

btw, in 4.0.5 the com extension is not working properly, maybe you have to wait for 
4.0.6 (or use the -dev version)

Previous Comments:

[2001-05-15 07:04:49] [EMAIL PROTECTED]
here my problem with COM in PHP.

echo "J-Server in der dynamischen PHP-Web-Site. <br><br>";

$jServer = new COM("jexeserver") or DIE ("Connect zum J Server ist nicht

$jServer->Do("0!:0 <(1!:40''),'systemextrasconfigprofile.ijs'");



$Var = "xxx";
$jServer->SetB("NN", $Var);      //  In the COM server: NN = $Var
$jServer->Do("NN");                  //  Display NN in the COM server
$jServer->Do("NN=:'yyy'");         //  In the COM server: NN = "yyy"

$jServer->GetB("NN", &$Var);    //  <===============   There is my problem:  (& is a 
                                               //  In the COM server &$Var = NN
echo $Var;                               // echo $Var Output: xxx and not yyy ?!?



Is there a bug in my code or is this a bug in COM ???


ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to