C# Export function dll
我使用了Robert Giesecke的Unmanaged-Exports软件包,该软件包可在(https://sites.google.com/site/robertgiesecke/Home/uploads/unmanagedexports)中找到。
我想导出一个函数,但是某种程度上它不起作用。该函数将不会导出。
我的方法:
代码:
1 2 3 4 5 | [DllExport("test", CallingConvention = CallingConvention.StdCall)] public static string test() { return"Hello World, this is the DLL"; } |
我的IDA结果的屏幕截图:
您可以看到它们为空,因为未导出任何函数。
解决方案:http://www.codeproject.com/Articles/37675/Simple-Method-of-DLL-Export-without-C-CLI
将" DllExporter.exe "放入项目文件夹中。
德语文章:http://www.sotzny.de/2011/11/10/dllexport-net-ohne-ccli/