summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve MacLean <stmaclea@microsoft.com>2019-05-21 16:04:13 -0400
committerGitHub <noreply@github.com>2019-05-21 16:04:13 -0400
commit5a44c6f3ce7629a8cd55b56a2f3d8c66c6e87b34 (patch)
tree08196ff31cecac0cea14bb5c83f0d634bc5deb8b /src
parent0d6facf7afac5868db3dce55a1fb940a02365687 (diff)
downloadcoreclr-5a44c6f3ce7629a8cd55b56a2f3d8c66c6e87b34.tar.gz
coreclr-5a44c6f3ce7629a8cd55b56a2f3d8c66c6e87b34.tar.bz2
coreclr-5a44c6f3ce7629a8cd55b56a2f3d8c66c6e87b34.zip
Update CreateNativeDelegate calling convention (#24690)
Pass strings as UTF16 on Windows
Diffstat (limited to 'src')
-rw-r--r--src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs b/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs
index 6f1971406b..6c5699ed14 100644
--- a/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs
+++ b/src/System.Private.CoreLib/src/Internal/Runtime/InteropServices/ComponentActivator.cs
@@ -32,7 +32,12 @@ namespace Internal.Runtime.InteropServices
{
throw new ArgumentNullException(argName);
}
+
+#if PLATFORM_WINDOWS
+ string? result = Marshal.PtrToStringUni(arg);
+#else
string? result = Marshal.PtrToStringUTF8(arg);
+#endif
if (result == null)
{