How to load a DLL file in PHP

I am developing my own application in PHP for Mdaemon Mail Server. There are no API samples in PHP, they are all in CPP and VB.

I know that we can work with dlls in files in PHP using COM , and I am also in windows environment. To get things started, I need to upload a file MDUser.dll.

So far, I have downloaded php_com_dotnet.dlland placed it in the extensions directory on my wamp server C:\wamp\bin\php\php5.3.13\ext. I turned on the extension in php.iniextension=php_com_dotnet.dll

This is my code.

$oMDUser =  new COM("MDUserCOM.MDUser") or die("Unable to instantiate MDUSER COM object");

This line throws an error.

Fatal error: throw a "com_exception" exception with the message "Failed to create the MDUserCOM.MDUser' in C:\wamp\www\mdaemon\test.php on line 20 ( ! ) com_exception: Failed to create COM objectMDUserCOM.MDUser COM object ": invalid syntax in C: \ wamp \ www \ mdaemon \ test.php on line 20

, MDUserCOM.MDUser. COM. Ex $obj = new COM("Application.ID") ID .

dll. MDUser.dll. , .

+4

All Articles