2
votes

I'm trying to access my COM object (in registered DLL) from PHP.

It is possible to access this COM Object from other application (using tlb file), but as I'm not PHP developer, I've experienced issues with accessing it from PHP. I've tried to access it using

$com = new COM('ITestCOMClass');

but as result only Failed to create COM objectITestCOMClass':` appears. Could someone help me with this problem? Example will be very useful.

PS:

  • ITestCOMClass - abstract interface,
  • TTestCOMClass- class, which implements this interface,
  • CoTTestCOMClass - factory class, which creates an instance of TTestCOMClass.

Thanks

1

1 Answers

0
votes

You're not using a fully qualified object name. It should be along the lines of ProgID.ObjectName:

$com = new COM('MyProject.ITestCOMClass');

Check out this question to get the list of COM objects on the system. That may reveal the full name you need to use.