From 15f64b18988c1a8b660785333c4f36cdc7198ce4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Mon, 29 Sep 2025 20:06:47 +0200 Subject: [PATCH] Added note about caching to DllImportResolver --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 88f961e4f22..9e9d4eba92d 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,6 +39,8 @@ The runtime does not do any lifetime management around the handle returned by a . It is left to the implementation and consuming code to keep the library loaded for as long as necessary and free it if/when desired. +The resolver delegate is called everytime when a PInvoke call is done. It is fine to cache the handle, as long as the consuming code does not call . + ]]>