diff --git a/PInvoke/ComDlg32/ComDlg32.cs b/PInvoke/ComDlg32/ComDlg32.cs index 99f2fb05..560af2f1 100644 --- a/PInvoke/ComDlg32/ComDlg32.cs +++ b/PInvoke/ComDlg32/ComDlg32.cs @@ -1,5 +1,7 @@ using System; using System.Runtime.InteropServices; +using Vanara.Extensions; +using Vanara.InteropServices; using static Vanara.PInvoke.Kernel32; using static Vanara.PInvoke.User32; @@ -1364,8 +1366,7 @@ namespace Vanara.PInvoke /// Style combo box into this buffer. /// /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpszStyle; + public StrPtrAuto lpszStyle; /// /// Type: WORD @@ -1649,8 +1650,7 @@ namespace Vanara.PInvoke /// lpstrFindWhat contains the string to be replaced. /// /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrFindWhat; + public StrPtrAuto lpstrFindWhat; /// /// Type: LPTSTR @@ -1665,8 +1665,7 @@ namespace Vanara.PInvoke /// /// The FindText function ignores this member. /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrReplaceWith; + public StrPtrAuto lpstrReplaceWith; /// /// Type: WORD @@ -1825,7 +1824,7 @@ namespace Vanara.PInvoke /// for this parameter. /// /// - public uint lStructSize; + public int lStructSize; /// /// Type: HWND @@ -1894,8 +1893,7 @@ namespace Vanara.PInvoke /// the lpstrCustomFilter buffer. /// /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrCustomFilter; + public StrPtrAuto lpstrCustomFilter; /// /// Type: DWORD @@ -1942,8 +1940,7 @@ namespace Vanara.PInvoke /// bytes or characters. /// /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrFile; + public StrPtrAuto lpstrFile; /// /// Type: DWORD @@ -1954,14 +1951,13 @@ namespace Vanara.PInvoke /// characters long. /// /// - public uint nMaxFile; + public int nMaxFile; /// /// Type: LPTSTR /// The file name and extension (without path information) of the selected file. This member can be NULL. /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrFileTitle; + public StrPtrAuto lpstrFileTitle; /// /// Type: DWORD @@ -2030,8 +2026,7 @@ namespace Vanara.PInvoke /// /// /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrInitialDir; + public StrPtrAuto lpstrInitialDir; /// /// Type: LPCTSTR @@ -2040,8 +2035,7 @@ namespace Vanara.PInvoke /// (that is, Save As or Open). /// /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrTitle; + public StrPtrAuto lpstrTitle; /// /// Type: DWORD @@ -2297,8 +2291,7 @@ namespace Vanara.PInvoke /// a period (.). If this member is NULL and the user fails to type an extension, no extension is appended. /// /// - [MarshalAs(UnmanagedType.LPTStr)] - public string lpstrDefExt; + public StrPtrAuto lpstrDefExt; /// /// Type: LPARAM @@ -2349,13 +2342,13 @@ namespace Vanara.PInvoke /// Type: void* /// This member is reserved. /// - public IntPtr pvReserved; + private IntPtr pvReserved; /// /// Type: DWORD /// This member is reserved. /// - public uint dwReserved; + private uint dwReserved; /// /// Type: DWORD @@ -2374,7 +2367,7 @@ namespace Vanara.PInvoke /// /// /// - public uint FlagsEx; + public OFN_EX FlagsEx; } ///