Delphi Function Call (to CW DLL) 
Author Message
 Delphi Function Call (to CW DLL)

Has anyone one called a CW DLL from delphi here?

What I need is a working example of a fuction call to a dll, the
declaration and also the actual call. If anyone can send me a working
sample (code) it would be great. Maybe even more than great!

Most likely, even a function call to a non-CW DLL from Delphi would point
us in the right direction.

Many thanks in advance,

Mike Wenzloff
Data Management Services, Inc.



Sat, 01 Jul 2000 03:00:00 GMT  
 Delphi Function Call (to CW DLL)

Mike,

In delphi i have the following prototypes set up that call clarion DLLs. Im
using delphi 1 with c4 compiled to 16 bits. I haven't tried any 32 bit stuff
(due to not having a 32bit ODBC driver for oracle that i can get to work
*grumble*).  Im not an expert but these have worked so far.  I had some
trouble passing strings (i might have figured it out but im still working on
it) so all these functions send a simple LONG (or longint in Pascal).
Here's the delphi declarations:

In the implementation section of a unit i prototype the calls

implementation

procedure PrintBilling(LocEventPtr:LongInt); far;
                  external 'H98BILL'  name 'PRINTBILLING';
function PrintVoucher(LocEventPtr:LongInt):LongInt; far;
                  external 'H98BILL' name 'PRINTVOUCHER';
function PrintMaterialListing(LocEventPtr:LongInt):longint; far;
                  external 'H98BILL' name 'PRINTMATERIALLISTING';
function PrintMaterialBudget(LocEventPtr:LongInt):longInt; far;
                  external 'H98BILL' name 'PRINTMATERIALBUDGET';
procedure PrintBillSummary(LocEventPtr:LongInt); far;
                  external 'H98BILL' name 'PRINTBILLINGSUMMARY';
function
DlgUpdateMaterials(LocMaterialsPtr,LocMode,LocEventPtr:longInt):LongInt;
far;
                  external 'H98BILL' name 'DLGUPDATEMATERIALS';
function GenerateBillingsc4(LocEventPtr:longInt):LongInt; far;
                  external 'H98BILL' name 'GENERATEBILLING';

and farther down i just call it like any other function/procedure:

  PrintBillSummary(EventInternal);

  if DlgUpdateMaterials(LocMaterialPtr,0,EventInternal) > 0 then begin
    UpdateScreen;
 end;

etc.

on the clarion side of things i prototype the calls like:

DLGUPDATEMATERIALS(LONG,LONG,LONG),LONG,PASCAL
GENERATEBILLING(LONG),PASCAL

the PASCAL part is important.

so far so good.

joe

Quote:

>Has anyone one called a CW DLL from Delphi here?

>What I need is a working example of a fuction call to a dll, the
>declaration and also the actual call. If anyone can send me a working
>sample (code) it would be great. Maybe even more than great!

>Most likely, even a function call to a non-CW DLL from Delphi would point
>us in the right direction.

>Many thanks in advance,

>Mike Wenzloff
>Data Management Services, Inc.



Sat, 01 Jul 2000 03:00:00 GMT  
 Delphi Function Call (to CW DLL)

Many thanks!
Mike


Quote:
> Mike,

> In delphi i have the following prototypes set up that call clarion DLLs.



Sun, 02 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Function call from Delphi to CW dll

2. A CW DLL called from Delphi

3. VB or Delphi help : Accessing a DLL using CW 2001.001

4. Delphi Dll in CW 2003

5. Callback Function from DVF6.0B2 DLL to Delphi 4 exe

6. Calling Delphi DLLs

7. Write delphi dll, call from clarion

8. Delphi calls to Clarion DLL:Parameters?

9. C5PE calling Delphi 5 DLL

10. Call a Borland Delphi DLL with Structs from LabView

11. Calling an activeX-DLL written in Delphi.

12. calling Delphi-DLL

 

 
Powered by phpBB® Forum Software