My C# .NET Core 3.0 application needs to export a variable/symbol that will be read by a 3rd-party device driver. (I do not have any ability to modify the driver in question to use a different method of communication.)
In C/C++ I would be able to do this trivially with the following:
extern "C" {
_declspec(dllexport) DWORD MyVariableName = 0x00000001;
}
How do I do this in .NET Core? I am aware of UnmanagedExports, but it only works when exporting functions, not variables.
User contributions licensed under CC BY-SA 3.0