Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exporting Functions

Status
Not open for further replies.

Abdo

Programmer
Oct 31, 2000
1
ES
Hello, my name is Abdo Roig. I have Visual C++ 5.0, and I need to export a function (in a DLL) in pascal style (I think I must use __stdcall), but it doesn't work. I have discovered that, even using extern "C" directrive, Visual C uses decorated names. VC puts a _ character before the name and @n after the name of the function, where n is a number. My question is if I can compile a C source code without that "decoration", and How can I do it. Because I think that this "decoration" is the problem of compatibility.
Thank you.
 
Abdo,

try somthing like this:

extern "C" __declspec(dllexport) MyExportedFunction( );

Good luck
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top