A CW DLL called from Delphi 
Author Message
 A CW DLL called from Delphi

Hi,

I'm trying to call a CW203 DLL from within a delphi program with no luck
at all I have declared the procedure in the dll as a extr{*filter*}and with
the following parameters :

    CWProc(*Long,*String),C

I have tried all sorts of combinations String, Pstring, Cstring,
*Pstring, *Cstring but nothing seems work.  the problem is that
allthough I can call the DLL the parameters only show some crap.

If someone has experiance with this then please help.

best regards,

Stefan Baxter



Mon, 18 Oct 1999 03:00:00 GMT  
 A CW DLL called from Delphi

Which is the original Clarion prototype? I may be able to
help

        regards,

        Roberto

Quote:

> Hi,

> I'm trying to call a CW203 DLL from within a Delphi program with no luck
> at all I have declared the procedure in the dll as a extr{*filter*}and with
> the following parameters :

>     CWProc(*Long,*String),C

> I have tried all sorts of combinations String, Pstring, Cstring,
> *Pstring, *Cstring but nothing seems work.  the problem is that
> allthough I can call the DLL the parameters only show some crap.

> If someone has experiance with this then please help.

> best regards,

> Stefan Baxter



Tue, 19 Oct 1999 03:00:00 GMT  
 A CW DLL called from Delphi


Quote:
> I'm trying to call a CW203 DLL from within a Delphi program with no luck
> at all I have declared the procedure in the dll as a extr{*filter*}and with
> the following parameters :

>     CWProc(*Long,*String),C

I don't have any experience with Delphi (shudder), but here are some things
you probably want to check:

1) My guess is that Delphi uses the Pascal calling convention.
2) When Clarion passes strings around it passes both the string address and
length. You can use the RAW attribute when prototyping external functions
to tell Clarion not to pass the length out. When passing INTO Clarion you
need to pass a length value. I think what you end up with is
*CSTRING,SIGNED.

Steve
--
Steven C. Gallafent - The Computer Guy



Wed, 20 Oct 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Delphi Function Call (to CW DLL)

2. Function call from Delphi to CW dll

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

4. Delphi Dll in CW 2003

5. Calling Delphi DLLs

6. Write delphi dll, call from clarion

7. Delphi calls to Clarion DLL:Parameters?

8. C5PE calling Delphi 5 DLL

9. Call a Borland Delphi DLL with Structs from LabView

10. Calling an activeX-DLL written in Delphi.

11. calling Delphi-DLL

12. calling visual fortran 6.5 routines in a dll from delphi 7

 

 
Powered by phpBB® Forum Software