2

I have created a C# Com class. It's named ComClassExample.ComClassExample. The following VBS script can interact with the COM class:

dim objTest, intResult
Set objTest = WScript.CreateObject ("ComClassExample.ComClassExample")

intResult = objTest.add (1,2)

However, when I try the same thing in PHP, it doesn't work:

$com = new COM("ComClassExample.ComClassExample");

This gives me the error:

com_exception: Failed to create COM object `ComClassExample.ComClassExample': Class not registered

Can anyone tell me why this might be? I know the COM class can be accessed by 32-bit processes as I used %windir%\SysWOW64\wscript.exe to run my VB script.

TheDoc
  • 21
  • 1

0 Answers0