RE: [PHP] Accessing DLL from PHP
If the ffi route doesn't work, just create a COM wrapper for the simple DLL, then you can map any functions you need. -Original Message- From: Rory McKinley [mailto:[EMAIL PROTECTED] Sent: 03 June 2005 11:17 To: php-general@lists.php.net Cc: Rory Browne Subject: Re: [PHP] Accessing DLL from PHP * This e-mail has been received by the Revenue Internet e-mail service. * Rory Browne wrote: > Just bare in mind, that I've never used ffi, and it's still alpha > code, and I'm not taking any blame it causes your dog to > explode. That's ok, I am sure there is no chance...rover, rover,what's the matter boy? (Sound of dog exploding) No. ;) Don't worry I am only planning on using it to generate other data on a dev box - so about the extreme worst that is going to happen is I have to reload the dev box - and anyway, what's life without a bit of adventure? Will let you know how it works out - only catch is I may have to dig through my library to find the book on "C" that I never read ;) for some of the syntax Rory (the other one) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This message has been delivered to the Internet by the Revenue Internet e-mail service * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing DLL from PHP
Rory Browne wrote: > Just bare in mind, that I've never used ffi, and it's still alpha > code, and I'm not taking any blame it causes your dog to > explode. That's ok, I am sure there is no chance...rover, rover,what's the matter boy? (Sound of dog exploding) No. ;) Don't worry I am only planning on using it to generate other data on a dev box - so about the extreme worst that is going to happen is I have to reload the dev box - and anyway, what's life without a bit of adventure? Will let you know how it works out - only catch is I may have to dig through my library to find the book on "C" that I never read ;) for some of the syntax Rory (the other one) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing DLL from PHP
On 6/2/05, Rory McKinley <[EMAIL PROTECTED]> wrote: > Richard Davey wrote: > > > If the DLL has a COM interface then you can use PHP to talk to it, the > > process is actually quite straight forward (depending on what the DLL > > actually does of course). > > > > Best regards, > > > > Richard Davey > > > Hi Richard > > Rory (the other one ;) ) also mentioned a COM interface - currently I am > trying to find out if such a beast exists for the DLL, there is nothing > in the documentation. I would be interested to know if there was an easy > way to found out - still STFW though. > > Have downloaded ffi as per Rory's suggestion, from the attached > documentation it looks as if it may be doable if the COM route doesn't > pan out. Just bare in mind, that I've never used ffi, and it's still alpha code, and I'm not taking any blame it causes your dog to explode. > > Regards > > Rory > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing DLL from PHP
Richard Davey wrote: > If the DLL has a COM interface then you can use PHP to talk to it, the > process is actually quite straight forward (depending on what the DLL > actually does of course). > > Best regards, > > Richard Davey Hi Richard Rory (the other one ;) ) also mentioned a COM interface - currently I am trying to find out if such a beast exists for the DLL, there is nothing in the documentation. I would be interested to know if there was an easy way to found out - still STFW though. Have downloaded ffi as per Rory's suggestion, from the attached documentation it looks as if it may be doable if the COM route doesn't pan out. Regards Rory -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing DLL from PHP
Hello Rory, Thursday, June 2, 2005, 11:53:56 AM, you wrote: RM> I have RTFM, and I am still busy STFW and STFA, but the little bit RM> that I have found has lead me towards trying to understand COM RM> (eek!). Before I go down that particular garden path, I would like RM> to know if there is any chance of success with PHP, or should I RM> look at non-PHP alternatives to access the DLL (e.g. C?) If the DLL has a COM interface then you can use PHP to talk to it, the process is actually quite straight forward (depending on what the DLL actually does of course). Best regards, Richard Davey -- http://www.launchcode.co.uk - PHP Development Services "I do not fear computers. I fear the lack of them." - Isaac Asimov -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing DLL from PHP
perhaps the system command is what you are looking for? its in the manual. just search in the manual for it... Hope this helps Angelo Zanetti Z Logic www.zlogic.co.za Rory McKinley wrote: >Hi list > >I do not have much programming experience outside some PHP stuff so >please excuse a stupid question: > >I have a DLL provided to me by a third-party with a small bit of >documentation regarding its structure and methods. The DLL caculates >event costs based on parameters passed to it. I would like to access >this DLL using PHP if possible. > >I have RTFM, and I am still busy STFW and STFA, but the little bit that >I have found has lead me towards trying to understand COM (eek!). Before >I go down that particular garden path, I would like to know if there is >any chance of success with PHP, or should I look at non-PHP alternatives >to access the DLL (e.g. C?) > >Regards > >Rory > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing DLL from PHP
I'm not too sure, but that sounds like a job for ffi. I think you'll find ffi at pecl.php.net, although, be warned that I've never used ffi, nor have I read any reports as to how well it worked. On 6/2/05, Rory McKinley <[EMAIL PROTECTED]> wrote: > Hi list > > I do not have much programming experience outside some PHP stuff so > please excuse a stupid question: > > I have a DLL provided to me by a third-party with a small bit of > documentation regarding its structure and methods. The DLL caculates > event costs based on parameters passed to it. I would like to access > this DLL using PHP if possible. > > I have RTFM, and I am still busy STFW and STFA, but the little bit that > I have found has lead me towards trying to understand COM (eek!). Does the module you're trying to access have a COM interface? If not, then this is a non-runner. Regards Rory (seriously) > Before > I go down that particular garden path, I would like to know if there is > any chance of success with PHP, or should I look at non-PHP alternatives > to access the DLL (e.g. C?) > > Regards > > Rory > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php