Using DLL

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
N1gel
Forum Commoner
Posts: 95
Joined: Sun Apr 30, 2006 12:01 pm

Using DLL

Post by N1gel »

Hi

Is it possible to load a C++ DLL from PHP using dl().

I have been looking at the manual and am trying to use. dl()

In my code at the line

Code: Select all

dl("dll_geodetics.dll");
I am getting the error message
Warning: dl() [function.dl]: Invalid library (maybe not a PHP library) 'dll_geodetics.dll' in... e.t.c
Is there something i have to do to make my DLL a PHP library or extension.

I would be greatfull for any help

Thanks

Nigel
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

As you have found, dl() is for PHP libraries only.

You will need to recompile the DLL using PHP's libraries. There are many pages about creating PHP extensions available. Please search them out.
Post Reply