Calling a Windows dll from PHP 5.2.3

I am using php 5.2.3 and would like to call a windows dll I wrote. The dll is an mfc dll, but the functions are exported as      extern "C" VOID PASCAL EXPORT MyFunction(char* name, char* city).  Any help appreciated.
Who is Participating?
if it is an MFC then it should be native to C++, you can call those like any other dll. So all you ened to do is start a console application, then in the int main block simply call the function of an external dll, and off you go xD

to call function from a DLL:
If your DLL contains a COM server and implements IDispatch, then you should be able to load it.  If not, then you're probably going to have to write a custom PECL/Zend extension to load the DLL.
these are better handle either with a extension, or in some cases a call to a console application written in C/C++ etc
dhenderson12Author Commented:
Thanks for the response.  How would I add a com server to my dll and implement IDispatch?  I'm not a MS C++ developer, so I would appreciate some guidance here, maybe some example code I can try.  I'm also unclear how I would call a console app from PHP if I can't call a dll.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.