Delphi call VC DLL 
Author Message
 Delphi call VC DLL

Quote:

>Hi,
>I had written VC DLL. Now I want to write a delphi program that use this VC DLL function. Where can
>I find the solution ? Where can I find sample code ?
>Thanks for answering my question.
>Jim

I have written several DLLs.  Depending on your naming conventions
when compiled, you may have to use the 'index' like I did or you can
use the 'name' clause to specify the external function name by actual
function name.

Here is a sample from NitroSort.

function Sort(
            cmdStmt : PChar;
            errorStr : PChar;
            errorLen : cardinal;
            statusProc : TSortStatusProc;
            userData : pointer
         ) : integer; stdcall; external 'NITRO.DLL' index 1;

Of course, stdcall must be present to use standard windows calling
convention.  the 'external' clause names the dll and the index allows
you to reference the function by index number.  If you would rather
use the 'name' or not use the index, you can use 'name'.  For example.

function foo : integer; stdcall; external 'foo.dll' name 'Foo';

That should do it.

Jay Cole




Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. CloseFile in Delphi DLL not Closing File till Dll Unloads when called from VB

2. how can i use this function (written in VC , GEO3D.dll)

3. Calling codebase dll functions from another dll

4. 32 Bit DLL call to Comdlg32.dll in Win 95

5. 32 Bit DLL call to Comdlg32.dll in Win 95

6. Calling a Delphi DLL from Visual C++

7. Calling Cobol DLL's from Delphi

8. Calling NewEra DLL from Delphi

9. VB4 calls to Delphi DLL

10. Delphi and SQLBase V6.0 - Using SQLAPIW.DLL API Calls

11. 16 bit DLL calling form Delphi 3.0

12. Calling 32-bit DLLs from Delphi 1.0?

 

 
Powered by phpBB® Forum Software