Jump to content

How to use a dll. COM object in php?


jjmusicpro

Recommended Posts

ok so now im confused, i called the dll, and i cant figure out how to create a new instance of it, and run a method.

 

here is what i have in asp.net c#, it works

 

UMRAcomLib.Umra _UMRA = new UMRAcomLib.Umra();

 

_UMRA.SetVariableText("%Customer_First_Name%", firstname);

_UMRA.SetVariableText("%Customer_Last_Name%", lastname);

_UMRA.SetVariableText("%Customer_Description%", description);

_UMRA.ExecuteProjectScript("COM_Add_User");

 

but how do i do that in php ?

 

here is what i have so far.

 

<?php
// UMRA Variables
$Your_UMRA_Server = "xxxxx"; // UMRA Server Name
$Your_UMRA_Port = "xxxx"; // Default is 56814
$Your_UMRA_DLL_Path = "dll/xxxxxx" //Path to your UMRA DLL
$Connection_Status = ""; // Connection to UMRA Status
?>

<?php

$UMRA_Object =new COM("$Your_UMRA_DLL_Path") or die("Cannot start word for you"); 

print "Loaded word version ($UMRA_Object->Version)\n"; 

$UMRA_Object->Umra->Connect("$Your_UMRA_Server",Your_UMRA_Port);

if($UMRA_Object->Umra->Connect != 0)
{
  $Connection_Status = "Not Connected";
}
else
{
  $Connection_Status = "Connected";

}


?>

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.