From f617fffc8160768ec151708e4f77b692fe59b629 Mon Sep 17 00:00:00 2001 From: dahall Date: Fri, 1 Jan 2021 15:35:49 -0700 Subject: [PATCH] Fixed syntax errors in ComDlg32Tests --- UnitTests/PInvoke/ComDlg32/ComDlg32Tests.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/UnitTests/PInvoke/ComDlg32/ComDlg32Tests.cs b/UnitTests/PInvoke/ComDlg32/ComDlg32Tests.cs index 9d3ddae0..d2fbea16 100644 --- a/UnitTests/PInvoke/ComDlg32/ComDlg32Tests.cs +++ b/UnitTests/PInvoke/ComDlg32/ComDlg32Tests.cs @@ -2,6 +2,7 @@ using NUnit.Framework.Internal; using System; using System.Runtime.InteropServices; +using Vanara.InteropServices; using static Vanara.PInvoke.ComDlg32; using static Vanara.PInvoke.User32; @@ -40,8 +41,8 @@ namespace Vanara.PInvoke.Tests var ofn = new OPENFILENAME { lStructSize = (uint)Marshal.SizeOf(typeof(OPENFILENAME)), - lpstrFile = fn, - nMaxFile = (uint)fnch.Capacity, + lpstrFile = (IntPtr)fn, + nMaxFile = (uint)fn.Capacity, lpstrFilter = "All\0*.*\0Text\0*.txt\0", nFilterIndex = 1, Flags = OFN.OFN_PATHMUSTEXIST | OFN.OFN_FILEMUSTEXIST @@ -59,8 +60,8 @@ namespace Vanara.PInvoke.Tests { lStructSize = (uint)Marshal.SizeOf(typeof(FINDREPLACE)), hwndOwner = wnd.MessageWindowHandle, - lpstrFindWhat = fw, - wFindWhatLen = (ushort)fwch.Length, + lpstrFindWhat = (IntPtr)fw, + wFindWhatLen = (ushort)fw.Length, }; Assert.That(wnd.hdlg = FindText(ref fr), Is.True); }