diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml index 03afd30fd50..9266fd7fc60 100644 --- a/xml/System.Runtime.InteropServices/Marshal.xml +++ b/xml/System.Runtime.InteropServices/Marshal.xml @@ -3946,10 +3946,15 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho 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. + 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. + + It is recommended to use function pointers and instead. Function pointers are more efficient, easier to use correctly, and supported in all environments. + ]]> The parameter is a generic type definition. The parameter is . + Dynamic entrypoint allocation is not supported in the current environment. @@ -4014,11 +4019,15 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho 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 to the delegate. 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. - + + 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. + + It is recommended to use function pointers and instead. Function pointers are more efficient, easier to use correctly, and supported in all environments. ]]> The parameter is a generic type definition. The parameter is . + Dynamic entrypoint allocation is not supported in the current environment.