I want to export with the specified function name

Hi.

I am making dll on Island.
Specifying DllExport and Stdcall simultaneously changes the function name.

For example …

[DllExport(‘TestFunc’)]
[CallingConvention(CallingConvention.Stdcall)]
class method TestFunc: LongInt;

-> “_TestFunc@0”.

I want to export with the function name “TestFunc”.
Or if it is OSX (Darwin) it is “_TestFunc”.

If use Visual C ++, I will create a def file, but with Oxygene what should I do?

hi. Normally STDCALL methods are exported with @[sizeofparameters] after it, on osx a _ before it, etc. If you don’t want that behavior, you can override it with SymbolName:

[DllExport]
[CallingConvention(CallingConvention.Stdcall)]
[SymbolName(#1'TestFunc')]
1 Like

Thank you!

[DllExport (#1’TestFunc ')]
Since this writing method was also effective, it utilizes it! :smiley:

Yeah. Note that #1 overrides all behavior for symbol naming. So this will be called TestFunc on all platforms.