Jump to content


Photo

php4 -> php5 COM and VARIANT (try again)


  • Please log in to reply
1 reply to this topic

#1 jpaxtons

jpaxtons
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 September 2006 - 05:03 PM

Greetings!
Been searching for several days, find lots of stuff close, but still have not got this figured out.
Using WinXP sp2, Apache2 and PHP5

This worked on php4:
.
.
.
$Revelation = new COM("RevSoft.Revelation");
$Variant = new VARIANT();
$RevError = $Revelation->CreateEngine($Variant, "\\.\PHP");
$Engine = $Variant->value;
$RevError = $Engine->CreateQueue($Variant, "PHP", "DCE", "DCE");
$Queue = $Variant->value;
$RevError = $Queue->CallFunction($Variant, "PPtnx_store", $req);
$Data = $Variant->value;
echo $Data;
.
.
.
All is well until
$Engine=$Variant->value
which I understand is no longer done in php5.
If I
print "The type is " . variant_get_type($Variant) . "<br/>";
it returns 9 but I don't know what that means.

The eamples I find on the web are for calling MSWord which are not exactly applicable to my situation.
The "CreateEngine" works ok, and I think some kind of handle is passed back which the old
$Engine=$Variant->value
statement stuffed into $Engine for use by the "CreateQueue"

Any pointers on accomplishing this in php5 are appreciated.
Paxton Scott

#2 jpaxtons

jpaxtons
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 25 September 2006 - 05:52 PM

Here is how I got it to work:

$Revelation = new COM("RevSoft.Revelation");
$Variant = new VARIANT();
$RevError = $Revelation->CreateEngine($Variant, "\\.\PHP");
$Engine = $Variant;
$Variant1 = new VARIANT();
$RevError = $Engine->CreateQueue($Variant1, "PHP", "DCE", "DCE");
$Queue = $Variant1; 
$Variant2 = new VARIANT();
$RevError = $Queue->CallFunction($Variant2, "PPtnx_store", $req);
$Data = $Variant2;
echo $Data; 




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users