I want to export with the specified function name

island
(takepoi) #1

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?

0 Likes

(Carlo Kok) #2

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

(takepoi) #3

Thank you!

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

0 Likes

(Carlo Kok) #4

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

0 Likes