From ea76dd01f7060e4b5f486ffd7468746170cd9211 Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Tue, 25 May 2021 13:13:45 +0600 Subject: [PATCH] Add BSTR array marshalling. AsByValArrayTest without that was not working. --- .../tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs b/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs index d35fd18f1676..c38df7f285ed 100644 --- a/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs +++ b/src/coreclr/tools/Common/TypeSystem/Interop/IL/MarshalHelpers.cs @@ -791,6 +791,11 @@ private static MarshallerKind GetArrayElementMarshallerKind( return MarshallerKind.UnicodeString; case NativeTypeKind.LPUTF8Str: return MarshallerKind.UTF8String; + case NativeTypeKind.BStr: + case NativeTypeKind.TBStr: + return MarshallerKind.BSTRString; + case NativeTypeKind.AnsiBStr: + return MarshallerKind.AnsiBSTRString; default: return MarshallerKind.Invalid; }