Jump to content


Photo

Calling A Delphi Dll From Php

dll delphi com extentions

  • Please log in to reply
1 reply to this topic

#1 andy_baptiste

andy_baptiste

    Newbie

  • New Members
  • Pip
  • 1 posts

Posted 27 November 2012 - 12:17 PM

Hi,

I've been asked to update some existing PHP to use a DELPHI produced DLL in place of it's existing Data access code.

What I've tried so far:
  • Using COM, but I keep getting errors about an Unknown Interface that I have failed to get to the bottom of.
  • Using Delphi4PHP to create a DLL PHP extention, but when using this it caused Apache to crash altogether.

Has anyone successfully achieved communication with a Delphi produced DLL from within PHP?

Many thanks

Andy

Edited by andy_baptiste, 27 November 2012 - 12:19 PM.


#2 cpd

cpd

    ¬_¬

  • Members
  • PipPipPip
  • 890 posts
  • LocationLondon, UK

Posted 21 December 2012 - 05:16 AM

As long as its a valid dll file you should be able to import it fine. The fact its made in Delphi is irrelevant as you've compiled for Windows. Assuming the dll is registered on the PC/Server you're using you should be able to import it. Silly question: Are you running Windows or Linux?

Edited by CPD, 21 December 2012 - 05:17 AM.

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."

"One of my most productive days was throwing away 1000 lines of code."




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com