Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle 10 and Delphi 5 DLL

Re: Oracle 10 and Delphi 5 DLL

From: Billy <vslabs_at_onwe.co.za>
Date: 22 Jul 2005 02:26:52 -0700
Message-ID: <1122024412.195035.280340@g44g2000cwa.googlegroups.com>


Jens Gotthardsen wrote:

> Anybody had any success with intergrating a delphi 5 dll as an
> external function i Oracle 10?

Jens no, but I have written Delphi DLLs to integrate with numerous others servers and applications that publish a C call interface for intergration.

There a couple of basic issues when doing this.

Byte alignment is usually on word boundaries. Set the Delphi Compiler directive for that accordingly.

C call method vs Pascal call method. Basically this means read from left to right (Pascal) or from right to left (C) when passing parameters. Make sure to tell the Deplhi compiler how to read the parameters for a function if the calls made to it is not standard Pascal. BTW, many systems support the Pascal call method as a default, despite being coded in C. (again showing just how lame-ass C can be :-)

Data types. You need to map C data types to Delphi data types. All data types can be mapped as Delphi supports them all - but with different type names which causes some confusion the first time around.

I wrote the original Delphi wrapper for the X-Plane SDK (integration to a commercial flight simulator SDK used among other things for PCATD training). The Pascal/Delphi interface is still supported and maintained by the SDK developers - I suggest you download this if only to see the Delphi definitions for C data types and how the Delphi wrapper is defined for C integration. The URL is http://www.xsquawkbox.net/xpsdk/phpwiki/index.php

Unfortunately cannot help out more (despite still doing Delphi stuff at home) as I do not do Oracle on Windows. Nor have the slighest inkling of desire to. :-)

--
Billy
Received on Fri Jul 22 2005 - 04:26:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US