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
Copy file name to clipboardExpand all lines: xml/System.Runtime.InteropServices/Marshal.xml
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3989,10 +3989,15 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho
3989
3989
3990
3990
You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code.
3991
3991
3992
+
This API is unsupported in environments that don't support dynamic entry-point allocation, such as `ProcessDynamicCodePolicy` on Windows, `execmem off` in SELinux, and WebAssembly.
3993
+
3994
+
It is recommended to use function pointers and <xref:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute> instead. Function pointers are more efficient, easier to use correctly, and supported in all environments.
3995
+
3992
3996
]]></format>
3993
3997
</remarks>
3994
3998
<exception cref="T:System.ArgumentException">The <paramref name="d" /> parameter is a generic type definition.</exception>
3995
3999
<exception cref="T:System.ArgumentNullException">The <paramref name="d" /> parameter is <see langword="null" />.</exception>
4000
+
<exception cref="T:System.PlatformNotSupportedException">Dynamic entrypoint allocation is not supported in the current environment.</exception>
@@ -4058,11 +4063,15 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho
4058
4063
The delegate `d` is converted to a function pointer that can be passed to unmanaged code by using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the <xref:System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute> to the delegate.
4059
4064
4060
4065
You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code.
4061
-
4066
+
4067
+
This API is unsupported in environments that don't support dynamic entry-point allocation, such as `ProcessDynamicCodePolicy` on Windows, `execmem off` in SELinux, and WebAssembly.
4068
+
4069
+
It is recommended to use function pointers and <xref:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute> instead. Function pointers are more efficient, easier to use correctly, and supported in all environments.
4062
4070
]]></format>
4063
4071
</remarks>
4064
4072
<exception cref="T:System.ArgumentException">The <paramref name="d" /> parameter is a generic type definition.</exception>
4065
4073
<exception cref="T:System.ArgumentNullException">The <paramref name="d" /> parameter is <see langword="null" />.</exception>
4074
+
<exception cref="T:System.PlatformNotSupportedException">Dynamic entrypoint allocation is not supported in the current environment.</exception>
0 commit comments