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
@@ -3946,10 +3946,15 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho
3946
3946
3947
3947
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.
3948
3948
3949
+
This API is unsupported in environments that do not support dynamic entrypoint allocation, such as ProcessDynamicCodePolicy on Windows or WebAssembly.
3950
+
3951
+
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.
3952
+
3949
3953
]]></format>
3950
3954
</remarks>
3951
3955
<exception cref="T:System.ArgumentException">The <paramref name="d" /> parameter is a generic type definition.</exception>
3952
3956
<exception cref="T:System.ArgumentNullException">The <paramref name="d" /> parameter is <see langword="null" />.</exception>
3957
+
<exception cref="T:System.PlatformNotSupportedException">Dynamic entrypoint allocation is not supported in the current environment.</exception>
@@ -4014,11 +4019,15 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho
4014
4019
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.
4015
4020
4016
4021
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.
4017
-
4022
+
4023
+
This API is unsupported in environments that do not support dynamic entrypoint allocation, such as ProcessDynamicCodePolicy on Windows or WebAssembly.
4024
+
4025
+
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.
4018
4026
]]></format>
4019
4027
</remarks>
4020
4028
<exception cref="T:System.ArgumentException">The <paramref name="d" /> parameter is a generic type definition.</exception>
4021
4029
<exception cref="T:System.ArgumentNullException">The <paramref name="d" /> parameter is <see langword="null" />.</exception>
4030
+
<exception cref="T:System.PlatformNotSupportedException">Dynamic entrypoint allocation is not supported in the current environment.</exception>
0 commit comments