Question about definition files and DLLs

P

Paul Surgeon

I wrote a DLL (using free Borland C++ 5.5 compiler) and the app that calls
it would keep crashing until I found a definition file for my project.

All the definition file contains is :

EXPORTS
Linkage=_Linkage
ImportTable=_ImportTable

Those structures were already exported from my code using :
extern "C" __declspec (dllexport) ImportStructure ImportTable;

What's up with the underscores and how does it work?
How did it fix the DLL interface?

Thanks
Paul
 
V

Victor Bazarov

Paul Surgeon said:
I wrote a DLL (using free Borland C++ 5.5 compiler) and the app that calls
it would keep crashing until I found a definition file for my project.

All the definition file contains is :

EXPORTS
Linkage=_Linkage
ImportTable=_ImportTable

Those structures were already exported from my code using :
extern "C" __declspec (dllexport) ImportStructure ImportTable;

What's up with the underscores and how does it work?
How did it fix the DLL interface?

Neither DLLs nor the "definition file" are defined by the C++ language.
They are platform-specific, and as such are off-topic here. Your
question is better asked in comp.os.ms-windows.programmer.

Victor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top