|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10875 In COM Function: Return Var is emty
Submitted: 2001-05-15 07:04 UTC Modified: 2001-05-15 15:14 UTC
From: ws at olapline dot de Assigned:
Status: Closed Package: COM related
PHP Version: 4.0.5 OS: Win2000
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: ws at olapline dot de
New email:
PHP Version: OS:


 [2001-05-15 07:04 UTC] ws at olapline dot de
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''),'system\extras\config\profile.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 refernce)
                                               //  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 ???


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-15 15:12 UTC]
> $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 15:14 UTC]
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC