WhiteFalcon
Sharing the custom marshalled type across libraries
I guess the solution was to disable runtime marshalling with
[assembly: System.Runtime.CompilerServices.DisableRuntimeMarshalling]
The issue with such solution for me was that it triggers CA1420: Property, type, or attribute requires runtime marshalling
for delegates marked with [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
or any use of Marshal.GetFunctionPointerForDelegate
with delegates managed types (even if they have NativeMarshaller
)6 replies