Gibt es eine Alternative zu .NET Framework EmitCalli für netcoreapp1.0EmitCalli .net Kern alternative
if (IntPtr.Size == 4)
il.Emit(OpCodes.Ldc_I4, ptr.ToInt32());
else if (IntPtr.Size == 8)
il.Emit(OpCodes.Ldc_I8, ptr.ToInt64());
il.EmitCalli(OpCodes.Calli, CallingConvention.Cdecl, returnType, paramTypes);
CallingConventions verfügbar sein sind anders, es fehlt Cdecl. – ptp
Es scheint, dass hier möglicherweise eine Feature-Lücke besteht, abhängig davon, wie die native Funktion, die Sie aufrufen möchten, deklariert ist. Ich habe ein Problem in unserem Repository eingereicht, um diese Lücke zu verfolgen: https://github.com/dotnet/corefx/issues/9800 –
In diesem PR behoben - https://github.com/dotnet/coreclr/pull/15040 Es muss noch aus den Verträgen nach https://github.com/dotnet/corefx/issues/9800#issuecomment-344797679 ausgesetzt werden Ich sehe das auch an – Cronan