From 708d2fc39d18bb4a344c2e433d4fdb841f109984 Mon Sep 17 00:00:00 2001 From: David Hall Date: Thu, 7 Mar 2019 09:27:35 -0700 Subject: [PATCH] Removed IErrorProvider constraint --- PInvoke/Shared/FunctionHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PInvoke/Shared/FunctionHelper.cs b/PInvoke/Shared/FunctionHelper.cs index 7ba81aa0..915cc18f 100644 --- a/PInvoke/Shared/FunctionHelper.cs +++ b/PInvoke/Shared/FunctionHelper.cs @@ -17,7 +17,7 @@ namespace Vanara.PInvoke public static bool ChkGoodBuf(TSize sz, TRet err) where TSize : struct where TRet : IErrorProvider, IConvertible => !sz.Equals(default(TSize)) && (err.ToHRESULT() == (HRESULT)(Win32Error)Win32Error.ERROR_MORE_DATA || err.ToHRESULT() == (HRESULT)(Win32Error)Win32Error.ERROR_INSUFFICIENT_BUFFER); - public static TRet CallMethodWithStrBuf(SBFunc method, out string result, Func gotGoodSize = null) where TSize : struct, IConvertible where TRet : IErrorProvider + public static TRet CallMethodWithStrBuf(SBFunc method, out string result, Func gotGoodSize = null) where TSize : struct, IConvertible { TSize sz = default; var ret0 = method(null, ref sz);