Jump to content

php4 -> php5 COM and VARIANT (try again)


jpaxtons

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.