From 514e97470380820f86e29cf1c8e1b08f522d5a1d Mon Sep 17 00:00:00 2001 From: dahall Date: Sat, 11 Apr 2020 16:10:33 -0600 Subject: [PATCH] Modified GenericStringMarshaler type constraint to ISimpleMemoryMethods --- PInvoke/Shared/InteropServices/GenericStringMarshaler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PInvoke/Shared/InteropServices/GenericStringMarshaler.cs b/PInvoke/Shared/InteropServices/GenericStringMarshaler.cs index d00e0017..28c570d7 100644 --- a/PInvoke/Shared/InteropServices/GenericStringMarshaler.cs +++ b/PInvoke/Shared/InteropServices/GenericStringMarshaler.cs @@ -12,7 +12,7 @@ namespace Vanara.InteropServices /// The type of the memory allocator. /// /// - public class GenericStringMarshaler : GenericStringMarshalerBase where TMem : IMemoryMethods, new() + public class GenericStringMarshaler : GenericStringMarshalerBase where TMem : ISimpleMemoryMethods, new() { private GenericStringMarshaler(CharSet charSet) : base(charSet) { } @@ -29,7 +29,7 @@ namespace Vanara.InteropServices /// is used. /// /// - public abstract class GenericStringMarshalerBase : ICustomMarshaler where TMem : IMemoryMethods, new() + public abstract class GenericStringMarshalerBase : ICustomMarshaler where TMem : ISimpleMemoryMethods, new() { private static TMem mem = new TMem(); private readonly CharSet charSet;