Delphi call VC DLL

Quote
"Jim Wang" <j...@unitech.com.tw> wrote:
>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

My real address is @bgn.mindspring.com to prevent spam.