[英]Unmanaged Exports not showing up in DLL
I have a new project and a test class, method below:我有一个新项目和一个测试类,方法如下:
[ComVisible(true)]
[DllExport("Heartbeat2", CallingConvention = CallingConvention.StdCall)]
public static void Heartbeat2(){
//Do stuff here
}
Im using Unmanaged Exports (RGiesecke.DllExport) latest in DotNet 4.6...when running Nirsofts viewer, I do not see my method in the dll http://www.nirsoft.net/utils/dll_export_viewer.html )我在 DotNet 4.6 中使用最新的非托管导出(RGiesecke.DllExport)...运行 Nirsofts 查看器时,我在 dll http://www.nirsoft.net/utils/dll_export_viewer.html中看不到我的方法
I have the platform target to x86 also...what am I doing wrong?我也有 x86 的平台目标......我做错了什么? I plan on using this in a ruby 1.8.1 program using Win32API
我计划在使用 Win32API 的 ruby 1.8.1 程序中使用它
Giesecke's Unmanaged Exports works fine using VS2015, but not in VS2017 or VS2019. Giesecke 的 Unmanaged Exports 使用 VS2015 工作正常,但不适用于 VS2017 或 VS2019。
Try downloading VS2015 Community and try your example there.尝试下载 VS2015 社区并在那里尝试您的示例。 Be sure you are building for X64 or X86, not Any CPU.
确保您是为 X64 或 X86 而不是任何 CPU 构建的。 The Unmanaged Exports should generate a DLL, plus a LIB and RES file.
非托管导出应生成一个 DLL,以及一个 LIB 和 RES 文件。 You can check whether the DLL was modified by checking it with one of several fine .Net decompilers, my current favourite is https://www.jetbrains.com/decompiler/
您可以通过使用几个优秀的 .Net 反编译器之一检查 DLL 是否被修改,我目前最喜欢的是https://www.jetbrains.com/decompiler/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.