You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The UnmanagedCallersOnlyAttribute is part of the C# FunctionPointers proposal, specifically it's applied to methods that will be called from native code only #32462 (but note that the calling convention part will be changing #37612)
Implementation note: the presence of the attribute means that ldftn should return a pointer to a native-to-managed wrapper.
The text was updated successfully, but these errors were encountered:
Update actually this case will be a runtime exception. In CoreCLR since the UnmanagedCallersOnly check is done in the method itself (not at the ldftn site), it's hard for them to do the checking around a P/Invoke. Mono will follow CoreCLR behavior.
Another implementation note: if the function is actually already a native function we should get a pointer to it without a wrapper.
The
UnmanagedCallersOnlyAttribute
is part of the C# FunctionPointers proposal, specifically it's applied to methods that will be called from native code only #32462 (but note that the calling convention part will be changing #37612)Implementation note: the presence of the attribute means that
ldftn
should return a pointer to a native-to-managed wrapper.The text was updated successfully, but these errors were encountered: