Calling C/C++ DLL 
Author Message
 Calling C/C++ DLL

I have problem accessing DLL tthat was written in C/C++. Can someone please
tell me how to go about doing it. Thanks



Sat, 25 Jul 1998 03:00:00 GMT  
 Calling C/C++ DLL

: I have problem accessing DLL tthat was written in C/C++. Can someone please
: tell me how to go about doing it. Thanks

Here is one example.
Prototype in C++:
   extern "C" BOOL FAR Pascal _export Fxx();
Prototype in Delphi:
   function Fxx: WordBool; far; external 'DLLName';

'extern "C"' is needed if using C++.  Also it can be difficult to
match types of parameters. If parameters are floating point, only the 80
bit type has same format in Delphi and Borland C++.  Integers must be
matched 16 or 32 bits (short int in C++=int in Delphi 1, int in
C++=longint in Delphi), Boolean as shown above(Windows C BOOL=WordBool in
Delphi), and  'char *str'='var str:Pchar' etc.  



Sun, 26 Jul 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Calling a Delphi DLL from Visual C++

2. Calling C++ DLL to run on Sybase

3. How to Call a Visual C++ 1.52 DLL from Delphi 1.0

4. Calling ObjPascal Callback Routines from C++ DLL

5. Calling ObjPascal Callback Routines from C++ DLL

6. Delphi CS 1.02 to Sybase Help

7. Accessing oracle sequences from Delphi 1.0 CS

8. CS Apps : TTable or TQuery ?

9. Delphi CS, Oracle7.2 & SQLNetV2.2

10. Documents in tables in CS ?

11. help needed please for CS 110 class

12. Delphi 2.0 CS Update & BLOB Problem

 

 
Powered by phpBB® Forum Software