From 9144b107e49eaa876bec52f597a099a81cac5d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Mon, 29 Sep 2025 21:56:06 +0200 Subject: [PATCH 1/8] Update DllImportResolver.xml --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 9e9d4eba92d..86228ce2229 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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 . +For each entry point the resolver is called the first time PInvoke is done. As long as the library is not unloaded via it is safe to have a cache for libraryname to handle mapping. ]]> From e5c0e2e1c6fc8fcb3dd04dffa85d5fe89341bab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Mon, 29 Sep 2025 22:03:13 +0200 Subject: [PATCH 2/8] Update xml/System.Runtime.InteropServices/DllImportResolver.xml Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 86228ce2229..bc46c337d23 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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. -For each entry point the resolver is called the first time PInvoke is done. As long as the library is not unloaded via it is safe to have a cache for libraryname to handle mapping. +For each entry point, the resolver is called the first time PInvoke is used. As long as the library isn't unloaded via , it's safe to have a cache for `libraryname` to handle mapping. ]]> From 08db1bc81749fdb9a736f4094b3b69d625593a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=BCnther=20Foidl?= Date: Mon, 29 Sep 2025 22:26:58 +0200 Subject: [PATCH 3/8] Update xml/System.Runtime.InteropServices/DllImportResolver.xml Co-authored-by: Aaron Robinson --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index bc46c337d23..4ae281ef7f7 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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. -For each entry point, the resolver is called the first time PInvoke is used. As long as the library isn't unloaded via , it's safe to have a cache for `libraryname` to handle mapping. +For each entry point, the resolver is called the first time PInvoke is used. As long as the library isn't unloaded via , it's safe to have a cache for `libraryName` to handle mapping. ]]> From dc8ce6ddf98b7cf396cf1952132fbbb7a0a052a1 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 29 Sep 2025 21:12:43 -0700 Subject: [PATCH 4/8] Update xml/System.Runtime.InteropServices/DllImportResolver.xml --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 4ae281ef7f7..1b72979719d 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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. -For each entry point, the resolver is called the first time PInvoke is used. As long as the library isn't unloaded via , it's safe to have a cache for `libraryName` to handle mapping. +For each entry point, the resolver is called the first time PInvoke is used. The implementation of the callback may want to cache the `libraryName` to handle mapping to improve performance as long as the library isn't unloaded via , . ]]> From 2ef00abce43c588ecbd5a8f6bc314ebe8c715c02 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 29 Sep 2025 21:13:24 -0700 Subject: [PATCH 5/8] Update xml/System.Runtime.InteropServices/DllImportResolver.xml --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 1b72979719d..f73d5becc0e 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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. -For each entry point, the resolver is called the first time PInvoke is used. The implementation of the callback may want to cache the `libraryName` to handle mapping to improve performance as long as the library isn't unloaded via , . +For each entry point, the resolver is called the first time PInvoke is used. The implementation of the resolver may want to cache the `libraryName` to handle mapping to improve performance as long as the library isn't unloaded via , . ]]> From 009f9a38c0529d0b7ccad0063c7ea855f091afb0 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Mon, 29 Sep 2025 21:14:07 -0700 Subject: [PATCH 6/8] Update xml/System.Runtime.InteropServices/DllImportResolver.xml --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index f73d5becc0e..635f20af99b 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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. -For each entry point, the resolver is called the first time PInvoke is used. The implementation of the resolver may want to cache the `libraryName` to handle mapping to improve performance as long as the library isn't unloaded via , . +For each entry point, the resolver is called the first time PInvoke is used. The implementation of the resolver may want to cache the `libraryName` to handle mapping to improve performance as long as the library isn't unloaded via . ]]> From fb8b92b5c4f0c8f66e7a7489e7e088315c171933 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Tue, 30 Sep 2025 09:13:34 -0700 Subject: [PATCH 7/8] Update xml/System.Runtime.InteropServices/DllImportResolver.xml Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 635f20af99b..6e5e2828fd2 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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. -For each entry point, the resolver is called the first time PInvoke is used. The implementation of the resolver may want to cache the `libraryName` to handle mapping to improve performance as long as the library isn't unloaded via . +For each entry point, the resolver is called the first time PInvoke is used. To improve performance, the implementation of the resolver can cache the `libraryName` to handle mapping, as long as the library isn't unloaded via . ]]> From 8eae96317bf45b33471a4e1441d164833bc09676 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Tue, 30 Sep 2025 16:54:57 -0700 Subject: [PATCH 8/8] Update xml/System.Runtime.InteropServices/DllImportResolver.xml --- xml/System.Runtime.InteropServices/DllImportResolver.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System.Runtime.InteropServices/DllImportResolver.xml b/xml/System.Runtime.InteropServices/DllImportResolver.xml index 6e5e2828fd2..491a11b1dca 100644 --- a/xml/System.Runtime.InteropServices/DllImportResolver.xml +++ b/xml/System.Runtime.InteropServices/DllImportResolver.xml @@ -39,7 +39,7 @@ 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. -For each entry point, the resolver is called the first time PInvoke is used. To improve performance, the implementation of the resolver can cache the `libraryName` to handle mapping, as long as the library isn't unloaded via . +The resolver is typically called once for each PInvoke entry point. To improve performance, the implementation of the resolver can cache the `libraryName` to handle mapping, as long as the library isn't unloaded via . ]]>