diff --git a/PInvoke/Kernel32/WinBase.File.cs b/PInvoke/Kernel32/WinBase.File.cs index 894193c6..098a8c57 100644 --- a/PInvoke/Kernel32/WinBase.File.cs +++ b/PInvoke/Kernel32/WinBase.File.cs @@ -3177,7 +3177,7 @@ namespace Vanara.PInvoke /// List of strings returned by and methods. private static IEnumerable EnumFindMethods(FindFirstDelegate first, FindNextDelegate next, uint strSz = MAX_PATH + 1, uint done = Win32Error.ERROR_HANDLE_EOF) where THandle : SafeHandle { - var sb = new StringBuilder((int)strSz, (int)strSz); + var sb = new StringBuilder((int)strSz); THandle h; while ((h = first(sb, ref strSz)).IsInvalid) { @@ -5153,4 +5153,4 @@ namespace Vanara.PInvoke protected override bool InternalReleaseHandle() => FindVolumeMountPointClose(handle); } } -} \ No newline at end of file +}