php communication with dll?
I need pass data (in this case just a single id) to a custom dll using php. Can you work directly with a dll in php? Having never worked with a dll before I'm not really sure how it works. Is it similar in nature to a web serv开发者_开发百科ice or rpc?
Since this is a custom DLL, perhaps you'd consider making a PHP extension?
Alternatively, PHP supports COM. If you can make a COM DLL, you're in good shape: http://us.php.net/COM
Finally, is it something that can be used with rundll32? If so, you could call it with exec()
.
There is a number of windows specific extensions in PHP (COM, .NET, …). See the Manual for
- http://php.net/manual/en/refs.utilspec.windows.php
One likely candidate might be the w32Api pecl extension:
This extension is a generic extension API to DLLs. This was originally written to allow access to the Win32 API from PHP, although you can also access other functions exported via other DLLs.
Most of them are marked as experimental though.
精彩评论