php & com
Posted: Fri Jun 11, 2004 4:53 pm
hi, i saw some examples on how to use COM objects by PHP 4. but they are all about Excel, Word, ADODB etc.
if i have a library named "mylibrary.dll", how do you make php know the existence of the libray, and how do you know what functions this library provide you, and how do you load the library in the php program?
it dies when i tried to run this program.
<?php
// create an object instance
$mylibrary = new COM("C:\lib\MyLibrary.dll") or die("MyLibrary could not be started");
$mylibrary = null;
?>
1. I have built a DLL to calculate something. Is there any way to run this DLL under PHP ?
If this is a simple DLL there is no way yet to run it from PHP. If the DLL contains a COM server you may be able to access it if it implements the IDispatch interface.
what does the above faq mean? i can't use MyLibrary.dll? how do you know if this particular dll implement the IDispatch interface?
if i have a library named "mylibrary.dll", how do you make php know the existence of the libray, and how do you know what functions this library provide you, and how do you load the library in the php program?
it dies when i tried to run this program.
<?php
// create an object instance
$mylibrary = new COM("C:\lib\MyLibrary.dll") or die("MyLibrary could not be started");
$mylibrary = null;
?>
1. I have built a DLL to calculate something. Is there any way to run this DLL under PHP ?
If this is a simple DLL there is no way yet to run it from PHP. If the DLL contains a COM server you may be able to access it if it implements the IDispatch interface.
what does the above faq mean? i can't use MyLibrary.dll? how do you know if this particular dll implement the IDispatch interface?