Unmanaged Exports not showing up in DLL

201 Views Asked by At

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)

I have the platform target to x86 also...what am I doing wrong? I plan on using this in a ruby 1.8.1 program using Win32API

1

There are 1 best solutions below

0
On

Giesecke's Unmanaged Exports works fine using VS2015, but not in VS2017 or VS2019.

Try downloading VS2015 Community and try your example there. Be sure you are building for X64 or X86, not Any CPU. The Unmanaged Exports should generate a DLL, plus a LIB and RES file. 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/