Re: Import functions from a DLL file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rui Silva wrote:
Hello!



I have a DLL witch I want to use in PHP.

This DLL file is Eztwain3.dll

It is possible running it on PHP?

I think I must create a special DLL (like php_Eztwain3.dll) to call
Eztwain3.dll and also php5ts.dll

Do you have the source for this DLL? I think you will find the process easier if you have this kind of access. Much, Much easier still if the DLL was originally written in C. If that's the case then everything you need is in the php source tarball :)



Then I just need to add the next line on the php.ini:

extension= php_Eztwain3.dll

And put the php_Eztwain3.dll in the php\ext\ dir

Is that correct?

Yep.


And, how can I create this DLL?

There is a great book I can recommend to help you out with this process, it's called "Advanced PHP Programming" and it is written by George Schlossnagle (one of the PHP developers). The last two sections of his book cover extending PHP... and of course the first 20 or so chapters are pretty useful as well :)


In his example he described writing an extension in C and showed how you could hook that into PHP as a module. I think that you will be able to use his example as a skeleton to at least understand how modules are interpreted by PHP. It's not exactly what you're looking for, but for cheap advice (the book is less than $50) this is probably as good as it's going to get :)


-- Teach a person to fish...

Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://www.php.net/manual/en/index.php
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux