Connecting Tech Pros Worldwide Forums | Help | Site Map

Using a native Windows-DLL from PHP?

O. Hauger
Guest
 
Posts: n/a
#1: Jul 17 '05
Hello,

I've an existing Windows-dll which I want to use within PHP. Is there
something similar to Java's "JNI" in PHP. Or do I have to make a
PHP-Extension from my existing DLL?

Thanks in advance!

Oliver

Erwin Moller
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Using a native Windows-DLL from PHP?


O. Hauger wrote:
[color=blue]
> Hello,
>
> I've an existing Windows-dll which I want to use within PHP. Is there
> something similar to Java's "JNI" in PHP. Or do I have to make a
> PHP-Extension from my existing DLL?
>
> Thanks in advance!
>
> Oliver[/color]

Hi Oliver,

Have a look at exec and the like:

http://nl2.php.net/manual/en/ref.exec.php
and also: passthru (If you need to capture any output produced)

Think commandline.
If you can define some commandline statement, you can feed it to PHP.
I don't think you can call a DLL directly, so you probably need to
find/write some wrapper.

Hope that helps.

Or maybe when you read through the documentation you find what you need.
(Not my area of expertice. :P)

Good luck,
Erwin Moller
Daniel Tryba
Guest
 
Posts: n/a
#3: Jul 17 '05

re: Using a native Windows-DLL from PHP?


O. Hauger <o.hauger@daa.de> wrote:[color=blue]
> I've an existing Windows-dll which I want to use within PHP. Is there
> something similar to Java's "JNI" in PHP. Or do I have to make a
> PHP-Extension from my existing DLL?[/color]

windows dlls can be accessed by:
http://nl2.php.net/manual/en/ref.w32api.php
of if they are COM:
http://nl2.php.net/manual/en/ref.com.php
or if they are .net modules:
http://nl2.php.net/manual/en/ref.dotnet.php

Closed Thread