Board index » delphi » Function name not found on DLL

Function name not found on DLL

I have a Delphi 2.0 application that calls a DLL written in C.  When I
run the caller there is an error that the function name inside the DLL
could not be found.  The DLL used to work as 16-bit called by Delphi
1.0 and now after recompiling it under MS VC++ 4.0 I get this problem.
The prototype of the function was changed to agree with the compiler's
new requirement for 32-bit as

     extern void __declspec(dllexport) __stdcall
    CALCULATE_OUTPUT(........)

The caller Delphi 2.0 is

procedure CALCULATE_OUTPUT(.........)
              stdcall;   external 'EDFCALC32';

where EDFCALC32.DLL is the name of the C DLL.  I kept the file
extensions for the source C files as .C to avoid the CPP name
mangling.  

Is it possible that some sort of name mangling is still going on?

Thanks for any ideas  /Luis

Luis C. Uribe
Software Developer & Consultant
San Francisco, CA
lur...@slip.net

 

Re:Function name not found on DLL


On Fri, 17 Jan 1997 01:13:54 GMT, lur...@slip.net (Luis C. Uribe)
wrote:

Quote
>I have a Delphi 2.0 application that calls a DLL written in C.  When I
>run the caller there is an error that the function name inside the DLL
>could not be found.  The DLL used to work as 16-bit called by Delphi
>1.0 and now after recompiling it under MS VC++ 4.0 I get this problem.
>The prototype of the function was changed to agree with the compiler's
>new requirement for 32-bit as

>     extern void __declspec(dllexport) __stdcall
>    CALCULATE_OUTPUT(........)

>The caller Delphi 2.0 is

>procedure CALCULATE_OUTPUT(.........)
>              stdcall;   external 'EDFCALC32';

>where EDFCALC32.DLL is the name of the C DLL.  I kept the file
>extensions for the source C files as .C to avoid the CPP name
>mangling.  

>Is it possible that some sort of name mangling is still going on?

See the FAQ (dfaq.zip) recently posted to this newsgroup by the
Graphical Gnome (sp?) for a long discussion of how to mix Delphi 2.0
and VC++
--
Stefan Hoffmeister                   Stefan.Hoffmeis...@Uni-Passau.de
University of Passau, Bavaria, Germany

Other Threads