runtime
runtime copied to clipboard
.Net Core 2.0 DllImport not working in Linux
Steps to reproduce
@martinwoodward What is the alternative for following code: This code i m using in Windows. I want alternate code for Linux(RHEL7).
usingSystem.Runtime.InteropServices;
namespace PInvokeSamples {
public static class Program {
// Import the kernel32.dll and define the method corresponding to the native function.
[DllImport("kernel32.dll")]
private static extern uint GetCurrentThreadId();
public static void Main(string[] args){
// Invoke the function and get the process Thread ID.
uint tid = GetCurrentThreadId();
Console.WriteLine(tid);
}
}
}
Expected behavior
It should work on Linux(RHEL7)
Actual behavior
It is not working in Linux(RHEL7)
Environment data
It is working fine on windows machine.
Moved to coreclr