Hello,

I writing a DLL using RadASM. When exporting functions using proc/endp everything works fine, but today I tried removing all the high-level stuff from the code, using labels instead of proc/endp. Now it wont assemble, it seems like masm can't find the labels.

What to do?
Posted on 2005-06-18 05:59:19 by Delight
You possibly need to add name decoration to the labels yourself. "C" functions need a "_" at the start. Stdcall functios need the "_" and also an "@#" at the end where # is the number of bytes passed to the function. This is also known as Name Mangling.

You should probably compile your DLL with the highlevel stuff first and then scan through the DLL yourself to see what decorations you need to add.
Posted on 2005-06-18 08:18:09 by Eóin
Agner Fog's Calling conventions paper is very useful to understand name mangling & calling conventions.

This is a report describing details about calling conventions, data representations, register usage and name mangling for many different C++ compilers for 16-bit, 32-bit and 64-bit x86-based systems, including DOS, Windows, Linux and FreeBSD.
Posted on 2005-06-18 10:04:26 by chep