Jump to content

Archived

This topic is now archived and is closed to further replies.

jpaxtons

php4 -> php5 COM and VARIANT (try again)

Recommended Posts

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

Share this post


Link to post
Share on other sites
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; 

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.