ID: 10875
Updated by: phanto
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: COM related
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

closed.j

Previous Comments:
---------------------------------------------------------------------------

[2001-05-15 15:12:57] [EMAIL PROTECTED]
> $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)

---------------------------------------------------------------------------

[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
möglich");
$jServer->Show(1);
$jServer->Log(1);

$jServer->Do("0!:0 <(1!:40''),'systemextrasconfigprofile.ijs'");
$jServer->Do("load'd:\j_tm1dll\j\tm1api.ijs'");
$jServer->Do("load'd:\j_tm1dll\j\tm1con.ijs'");
$jServer->Do("load'd:\j_tm1dll\j\tm1prop.ijs'");
$jServer->Do("load'd:\j_tm1dll\j\tm1view.ijs'");

$jServer->Do("Tm1On''");
$jServer->Do("Tm1AdmSet'OLAPLINE01'");
$jServer->Do("SrvCon'zeiterf';'Admin';''");

#$jServer->Do("NN=:'XXX'");

$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 
refernce)
                                               //  In the COM server &$Var = NN
echo $Var;                               // echo $Var Output: xxx and not yyy ?!?

$jServer->Quit();

?>

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 http://bugs.php.net/?id=10875&edit=2


-- 
PHP Development Mailing List <http://www.php.net/>
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