From 8a1355b0af927bded7086e387a2d0a9de9c6e748 Mon Sep 17 00:00:00 2001 From: David Hall Date: Wed, 28 Nov 2018 12:33:55 -0700 Subject: [PATCH] Updated comments --- Core/Collections/VirtualDictionary.cs | 4 +- Core/Extensions/BitHelper.cs | 2 +- PInvoke/AclUI/AclUI.cs | 4 +- PInvoke/ComCtl32/CommCtrl.ListView.cs | 6 +- PInvoke/ComCtl32/CommCtrl.Progress.cs | 2 +- PInvoke/ComCtl32/CommCtrl.PropSheet.cs | 2 +- PInvoke/ComCtl32/CommCtrl.Tab.cs | 4 +- PInvoke/ComCtl32/CommCtrl.cs | 11 +- PInvoke/ComCtl32/dpa_dsa.cs | 2 +- PInvoke/Gdi32/GdiObjExtensions.cs | 4 +- PInvoke/Gdi32/WinGdi.SafeDCHandles.cs | 5 +- PInvoke/Gdi32/WinGdi.cs | 2 +- PInvoke/IpHlpApi/IpHlpApi.cs | 4 +- PInvoke/IpHlpApi/NetIOApi.cs | 4 +- PInvoke/IpHlpApi/mib.cs | 8 +- PInvoke/Kernel32/DateTimeApi.cs | 2 +- PInvoke/Kernel32/ErrHandlingApi.cs | 170 ++++++++++------------ PInvoke/Kernel32/FileApi.cs | 2 +- PInvoke/Kernel32/HandleApi.cs | 4 +- PInvoke/Kernel32/HeapApi.cs | 1 - PInvoke/Kernel32/IoApiSet.cs | 2 +- PInvoke/Kernel32/JobApi.cs | 8 +- PInvoke/Kernel32/LibLoaderApi.cs | 2 +- PInvoke/Kernel32/MemoryApi.cs | 2 +- PInvoke/Kernel32/NamedPipeApi.cs | 2 +- PInvoke/Kernel32/ProcessEnv.cs | 2 +- PInvoke/Kernel32/SynchApi.cs | 4 +- PInvoke/Kernel32/SysInfoApi.cs | 6 +- PInvoke/Kernel32/TimeZoneApi.cs | 2 +- PInvoke/Kernel32/WinBase.App.cs | 4 +- PInvoke/Kernel32/WinBase.File.cs | 1 + PInvoke/Kernel32/WinBase.Mailslot.cs | 4 +- PInvoke/Kernel32/WinBase.ProcessThread.cs | 2 +- PInvoke/Kernel32/WinBase.cs | 12 +- PInvoke/Kernel32/WinCon.cs | 10 +- PInvoke/Kernel32/WinNls.cs | 2 +- PInvoke/Mpr/Winnetwk.cs | 4 +- PInvoke/NTDSApi/DsParse.cs | 8 +- PInvoke/NTDSApi/NTDSAPI.cs | 34 ++--- PInvoke/NTDll/NTDll.cs | 9 +- PInvoke/NetApi32/DsGetDC.cs | 6 +- PInvoke/NetApi32/Lm.cs | 4 +- PInvoke/Ole/Ole32/PropIdl.cs | 27 +--- PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs | 4 +- PInvoke/Security/AdvApi32/AccCtrl.cs | 3 +- PInvoke/Security/AdvApi32/AclApi.cs | 4 - PInvoke/Security/AdvApi32/NTSecApi.cs | 4 +- PInvoke/Security/AdvApi32/Sddl.cs | 1 - PInvoke/Security/AdvApi32/SecurityBaseApi.SID.cs | 2 +- PInvoke/Security/AdvApi32/WinNT.RegSvc.cs | 9 +- PInvoke/Security/AdvApi32/WinNT.cs | 2 +- PInvoke/Security/Authz/Authz.cs | 4 +- PInvoke/Shared/Handles.cs | 4 +- PInvoke/Shared/InteropServices/SafeNativeArray.cs | 10 +- PInvoke/Shared/ResourceId.cs | 2 + PInvoke/Shared/WinUser/SystemColorIndex.cs | 2 +- PInvoke/Shell32/ShObjIdl.IExtractImage.cs | 2 +- PInvoke/Shell32/ShellApi.cs | 28 ++-- PInvoke/Shell32/ShlObj.cs | 10 +- PInvoke/ShlwApi/ShlwApi.IQueryAssociations.cs | 2 +- PInvoke/ShlwApi/ShlwApi.PathXX.cs | 2 +- PInvoke/ShlwApi/ShlwApi.StrXX.cs | 4 +- PInvoke/ShlwApi/ShlwApi.UrlXX.cs | 8 +- PInvoke/ShlwApi/Shlwapi.cs | 16 +- PInvoke/TaskSchd/MSTask.cs | 9 +- PInvoke/User32.Gdi/WinUser.ComboBox.cs | 12 +- PInvoke/User32.Gdi/WinUser.Window.cs | 14 +- PInvoke/User32/WinUser.Clipboard.cs | 2 +- PInvoke/User32/WinUser.Hook.cs | 2 +- PInvoke/UxTheme/UXTHEME_BufferedPaint.cs | 2 + PInvoke/WinINet/WinINet.cs | 2 +- System/BITS/BackgroundCopyJobCollection.cs | 2 +- System/BITS/BackgroundCopyJobCredentials.cs | 4 +- System/Network/NetworkListManager.cs | 3 +- System/Path.cs | 2 +- WIndows.Forms/DesktopWindowManager.cs | 2 - WIndows.Forms/Dialogs/ShellProgressDialog.cs | 8 +- WIndows.Forms/Extensions/IconExtension.cs | 8 +- Windows.Shell/ShellFileOperations.cs | 115 --------------- Windows.Shell/ShellImageList.cs | 2 +- Windows.Shell/ShellItem.cs | 1 - 81 files changed, 280 insertions(+), 433 deletions(-) diff --git a/Core/Collections/VirtualDictionary.cs b/Core/Collections/VirtualDictionary.cs index ba096d02..7d9607a0 100644 --- a/Core/Collections/VirtualDictionary.cs +++ b/Core/Collections/VirtualDictionary.cs @@ -44,8 +44,8 @@ namespace Vanara.Collections protected IEnumerable> Items => Keys.Select(k => new KeyValuePair(k, this[k])); - /// Gets or sets the with the specified key. - /// The . + /// Gets or sets the value with the specified key. + /// The value. /// The key. /// public virtual TValue this[TKey key] diff --git a/Core/Extensions/BitHelper.cs b/Core/Extensions/BitHelper.cs index 9b570d3e..ad5f2688 100644 --- a/Core/Extensions/BitHelper.cs +++ b/Core/Extensions/BitHelper.cs @@ -48,7 +48,7 @@ namespace Vanara.Extensions /// The zero-based start index of the bit range to set. /// The number of sequential bits to set starting at . /// The value to set within the specified range of . - public static void SetBits(ref T bits, byte startIdx, byte count, TValue value) where T : struct, IComparable, IComparable, IConvertible, IEquatable, IFormattable where TValue : struct, IComparable, IComparable, IConvertible, IEquatable, IFormattable + public static void SetBits(ref T bits, byte startIdx, byte count, TValue value) where T : struct, IComparable, IComparable, IConvertible, IEquatable, IFormattable where TValue : struct, IComparable, IComparable, IConvertible, IEquatable, IFormattable { if (startIdx >= (Marshal.SizeOf(typeof(T)) * 8)) throw new ArgumentOutOfRangeException(nameof(startIdx)); if (count + startIdx > (Marshal.SizeOf(typeof(T)) * 8)) throw new ArgumentOutOfRangeException(nameof(count)); diff --git a/PInvoke/AclUI/AclUI.cs b/PInvoke/AclUI/AclUI.cs index 7e1a586a..0233e717 100644 --- a/PInvoke/AclUI/AclUI.cs +++ b/PInvoke/AclUI/AclUI.cs @@ -630,8 +630,8 @@ namespace Vanara.PInvoke } /// - /// Combines the and types for use in the last parameter of method. + /// Combines the and types for use in the last parameter of + /// method. /// /// The value. /// The value. diff --git a/PInvoke/ComCtl32/CommCtrl.ListView.cs b/PInvoke/ComCtl32/CommCtrl.ListView.cs index 4703085f..87890a88 100644 --- a/PInvoke/ComCtl32/CommCtrl.ListView.cs +++ b/PInvoke/ComCtl32/CommCtrl.ListView.cs @@ -863,13 +863,13 @@ namespace Vanara.PInvoke [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)] [PInvokeData("Winuser.h", MSDNShortId = "ms644950")] [System.Security.SecurityCritical] - public static extern IntPtr SendMessage(HWND hWnd, ListViewMessage message, [In, Out] ref LVITEMINDEX wParam, int lParam); + public static extern IntPtr SendMessage(HWND hWnd, ListViewMessage Msg, [In, Out] ref LVITEMINDEX wParam, int lParam); [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)] - public static extern IntPtr SendMessage(HWND hWnd, ListViewMessage message, int wParam, ref LVTILEVIEWINFO tileViewInfo); + public static extern IntPtr SendMessage(HWND hWnd, ListViewMessage Msg, int wParam, ref LVTILEVIEWINFO tileViewInfo); [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)] - public static extern IntPtr SendMessage(HWND hWnd, ListViewMessage message, ListViewImageList wParam, [In, Out] HIMAGELIST hImageList); + public static extern IntPtr SendMessage(HWND hWnd, ListViewMessage Msg, ListViewImageList wParam, [In, Out] HIMAGELIST hImageList); /// /// Contains information used when searching for a list-view item. This structure is identical to LV_FINDINFO but has been renamed to diff --git a/PInvoke/ComCtl32/CommCtrl.Progress.cs b/PInvoke/ComCtl32/CommCtrl.Progress.cs index 591b4553..13656a6d 100644 --- a/PInvoke/ComCtl32/CommCtrl.Progress.cs +++ b/PInvoke/ComCtl32/CommCtrl.Progress.cs @@ -81,7 +81,7 @@ namespace Vanara.PInvoke /// /// The message to be sent. /// Additional message-specific information. - /// Additional message-specific information. + /// Additional message-specific information. /// The return value specifies the result of the message processing; it depends on the message sent. [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)] public static extern IntPtr SendMessage(HWND hWnd, ProgressMessage Msg, bool wParam, ref PBRANGE progressRange); diff --git a/PInvoke/ComCtl32/CommCtrl.PropSheet.cs b/PInvoke/ComCtl32/CommCtrl.PropSheet.cs index 8943e8cc..4892d9bc 100644 --- a/PInvoke/ComCtl32/CommCtrl.PropSheet.cs +++ b/PInvoke/ComCtl32/CommCtrl.PropSheet.cs @@ -519,7 +519,7 @@ namespace Vanara.PInvoke [DllImport(Lib.ComCtl32, SetLastError = false, CharSet = CharSet.Auto)] [PInvokeData("Prsht.h", MSDNShortId = "bb760811")] [return: MarshalAs(UnmanagedType.SysInt)] - public static extern IntPtr PropertySheet(ref PROPSHEETHEADER psh); + public static extern IntPtr PropertySheet(ref PROPSHEETHEADER lppsph); // TODO: Convert resource id fields to managed properties. /// Defines the frame and pages of a property sheet. diff --git a/PInvoke/ComCtl32/CommCtrl.Tab.cs b/PInvoke/ComCtl32/CommCtrl.Tab.cs index 79a553c7..4465ed6c 100644 --- a/PInvoke/ComCtl32/CommCtrl.Tab.cs +++ b/PInvoke/ComCtl32/CommCtrl.Tab.cs @@ -252,7 +252,7 @@ namespace Vanara.PInvoke /// Additional message-specific information. /// The return value specifies the result of the message processing; it depends on the message sent. [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)] - public static extern IntPtr SendMessage(HWND hWnd, TabControlMessage Msg, int wParam, ref TCHITTESTINFO item); + public static extern IntPtr SendMessage(HWND hWnd, TabControlMessage Msg, int wParam, ref TCHITTESTINFO splitInfo); /// /// Sends the specified message to a window or windows. The SendMessage function calls the window procedure for the specified window @@ -268,7 +268,7 @@ namespace Vanara.PInvoke /// Additional message-specific information. /// The return value specifies the result of the message processing; it depends on the message sent. [DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)] - public static extern IntPtr SendMessage(HWND hWnd, TabControlMessage Msg, int wParam, TCITEM item); + public static extern IntPtr SendMessage(HWND hWnd, TabControlMessage Msg, int wParam, TCITEM splitInfo); /// Contains information about a hit test. This structure supersedes the TC_HITTESTINFO structure. [PInvokeData("Commctrl.h", MSDNShortId = "bb760553")] diff --git a/PInvoke/ComCtl32/CommCtrl.cs b/PInvoke/ComCtl32/CommCtrl.cs index 73287d03..813b70e1 100644 --- a/PInvoke/ComCtl32/CommCtrl.cs +++ b/PInvoke/ComCtl32/CommCtrl.cs @@ -60,8 +60,7 @@ namespace Vanara.PInvoke public delegate IntPtr SUBCLASSPROC(HWND hWnd, uint uMsg, IntPtr wParam, IntPtr lParam, [MarshalAs(UnmanagedType.SysUInt)] uint uIdSubclass, IntPtr dwRefData); /// - /// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling . + /// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling . /// [PInvokeData("Commctrl.h", MSDNShortId = "bb775507")] [Flags] @@ -1167,8 +1166,8 @@ namespace Vanara.PInvoke } /// - /// Carries information used to load common control classes from the dynamic-link library (DLL). This structure is used with the function. + /// Carries information used to load common control classes from the dynamic-link library (DLL). This structure is used with the + /// function. /// [PInvokeData("Commctrl.h", MSDNShortId = "bb775507")] [StructLayout(LayoutKind.Sequential)] @@ -1178,8 +1177,8 @@ namespace Vanara.PInvoke public int dwSize; /// - /// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling . + /// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling + /// . /// public CommonControlClass dwICC; diff --git a/PInvoke/ComCtl32/dpa_dsa.cs b/PInvoke/ComCtl32/dpa_dsa.cs index 72280faf..556a5232 100644 --- a/PInvoke/ComCtl32/dpa_dsa.cs +++ b/PInvoke/ComCtl32/dpa_dsa.cs @@ -358,7 +358,7 @@ namespace Vanara.PInvoke /// Returns the index of the new item or , if the append action fails. // int DPA_AppendPtr( HDPA pdpa, void *pitem); https://msdn.microsoft.com/en-us/library/windows/desktop/bb775585(v=vs.85).aspx [PInvokeData("Dpa_dsa.h", MSDNShortId = "bb775585")] - public static int DPA_AppendPtr(HDPA hdpa, IntPtr pitem) => DPA_InsertPtr(hdpa, DA_LAST, pitem); + public static int DPA_AppendPtr(HDPA pdpa, IntPtr pitem) => DPA_InsertPtr(pdpa, DA_LAST, pitem); /// /// diff --git a/PInvoke/Gdi32/GdiObjExtensions.cs b/PInvoke/Gdi32/GdiObjExtensions.cs index ded5eb46..f6449220 100644 --- a/PInvoke/Gdi32/GdiObjExtensions.cs +++ b/PInvoke/Gdi32/GdiObjExtensions.cs @@ -98,12 +98,12 @@ namespace Vanara.PInvoke public static Pen ToPen(this SafeHPEN hpen) => ((HPEN)hpen).ToPen(); /// Creates a from an . - /// The HRGN value. + /// The HRGN value. /// The Region instance. public static Region ToRegion(this in HRGN hrgn) => hrgn.IsNull ? null : Region.FromHrgn((IntPtr)hrgn); /// Creates a from an . - /// The HRGN value. + /// The HRGN value. /// The Region instance. public static Region ToRegion(this SafeHRGN hrgn) => ((HRGN)hrgn).ToRegion(); diff --git a/PInvoke/Gdi32/WinGdi.SafeDCHandles.cs b/PInvoke/Gdi32/WinGdi.SafeDCHandles.cs index 3694c6cd..bfa79e76 100644 --- a/PInvoke/Gdi32/WinGdi.SafeDCHandles.cs +++ b/PInvoke/Gdi32/WinGdi.SafeDCHandles.cs @@ -1,5 +1,6 @@ using System; using System.Drawing; +using System.Runtime.InteropServices; namespace Vanara.PInvoke { @@ -43,7 +44,7 @@ namespace Vanara.PInvoke } /// Initializes a new instance of the class. - /// The device context into which is selected. + /// The device context into which is selected. /// The graphics object to select. /// dc - Device context cannot be null. public GdiObjectContext(IDeviceContext dc, HGDIOBJ hObj) : this(new SafeHDC(dc ?? throw new ArgumentNullException(nameof(dc), "Device context cannot be null.")), hObj) { } @@ -53,7 +54,7 @@ namespace Vanara.PInvoke } /// - /// Provides a to a graphics bitmap object that releases a created HBITMAP instance at disposal using DeleteObject. + /// Provides a to a graphics bitmap object that releases a created HBITMAP instance at disposal using DeleteObject. /// public class SafeHBITMAP : HANDLE { diff --git a/PInvoke/Gdi32/WinGdi.cs b/PInvoke/Gdi32/WinGdi.cs index c6ec8dbd..05dfd766 100644 --- a/PInvoke/Gdi32/WinGdi.cs +++ b/PInvoke/Gdi32/WinGdi.cs @@ -597,7 +597,7 @@ namespace Vanara.PInvoke } /// Converts a height in logical units to pixels. - /// The height in logical units. + /// The height in logical units. /// The device context handle. /// The height in pixels. public static int LogicalHeightToDeviceWidth(int height, HDC hdc = default) diff --git a/PInvoke/IpHlpApi/IpHlpApi.cs b/PInvoke/IpHlpApi/IpHlpApi.cs index ed432d61..8bebcf10 100644 --- a/PInvoke/IpHlpApi/IpHlpApi.cs +++ b/PInvoke/IpHlpApi/IpHlpApi.cs @@ -2333,7 +2333,7 @@ namespace Vanara.PInvoke // pTcpTable, PDWORD pdwSize, BOOL bOrder, ULONG ulAf, TCP_TABLE_CLASS TableClass, ULONG Reserved ); [DllImport(Lib.IpHlpApi, SetLastError = false, ExactSpelling = true)] [PInvokeData("iphlpapi.h", MSDNShortId = "96356a0e-ae0d-4000-9223-a578cbdeaa8b")] - public static extern Win32Error GetExtendedTcpTable(IntPtr pTcpTable, ref uint dwOutBufLen, [MarshalAs(UnmanagedType.Bool)] bool bOrder, uint ulAf, TCP_TABLE_CLASS TableClass, uint Reserved = 0); + public static extern Win32Error GetExtendedTcpTable(IntPtr pTcpTable, ref uint pdwSize, [MarshalAs(UnmanagedType.Bool)] bool bOrder, uint ulAf, TCP_TABLE_CLASS TableClass, uint Reserved = 0); /// The GetExtendedTcpTable function retrieves a table that contains a list of TCP endpoints available to the application. /// The type that is defined as the table associated with the value. @@ -2995,7 +2995,7 @@ namespace Vanara.PInvoke // IpNetTable, PULONG SizePointer, BOOL Order ); [DllImport(Lib.IpHlpApi, SetLastError = false, ExactSpelling = true)] [PInvokeData("iphlpapi.h", MSDNShortId = "01bcf86e-5fcc-4ce9-bb89-02d393e75d1d")] - public static extern Win32Error GetIpNetTable(IntPtr pIpNetTable, ref uint pdwSize, [MarshalAs(UnmanagedType.Bool)] bool bOrder); + public static extern Win32Error GetIpNetTable(IntPtr pIpNetTable, ref uint pdwSize, [MarshalAs(UnmanagedType.Bool)] bool Order); /// The GetIpNetTable function retrieves the IPv4 to physical address mapping table. /// diff --git a/PInvoke/IpHlpApi/NetIOApi.cs b/PInvoke/IpHlpApi/NetIOApi.cs index 8c18928f..58ae863a 100644 --- a/PInvoke/IpHlpApi/NetIOApi.cs +++ b/PInvoke/IpHlpApi/NetIOApi.cs @@ -2714,7 +2714,7 @@ namespace Vanara.PInvoke // PMIB_IF_TABLE2 *Table ); [DllImport(Lib.IpHlpApi, SetLastError = false, ExactSpelling = true)] [PInvokeData("netioapi.h", MSDNShortId = "0153c41c-b02b-4832-87b3-88dc3a9f4ff1")] - public static extern Win32Error GetIfTable2(out MIB_IF_TABLE2 pIfTable); + public static extern Win32Error GetIfTable2(out MIB_IF_TABLE2 Table); /// /// The GetIfTable2Ex function retrieves the MIB-II interface table. @@ -2811,7 +2811,7 @@ namespace Vanara.PInvoke // GetIfTable2Ex( MIB_IF_TABLE_LEVEL Level, PMIB_IF_TABLE2 *Table ); [DllImport(Lib.IpHlpApi, SetLastError = false, ExactSpelling = true)] [PInvokeData("netioapi.h", MSDNShortId = "d8663894-50b1-4ca2-a1f4-6ca0970795a7")] - public static extern Win32Error GetIfTable2Ex(MIB_IF_TABLE_LEVEL Level, out MIB_IF_TABLE2 pIfTable); + public static extern Win32Error GetIfTable2Ex(MIB_IF_TABLE_LEVEL Level, out MIB_IF_TABLE2 Table); /// /// diff --git a/PInvoke/IpHlpApi/mib.cs b/PInvoke/IpHlpApi/mib.cs index 3cf08902..26ea5dd8 100644 --- a/PInvoke/IpHlpApi/mib.cs +++ b/PInvoke/IpHlpApi/mib.cs @@ -2749,7 +2749,7 @@ namespace Vanara.PInvoke [DefaultProperty(nameof(table))] public class MIB_IFTABLE : SafeElementArray { - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// Amount of space, in bytes, to reserve. public MIB_IFTABLE(uint byteSize) : base((int)byteSize, 0) { @@ -2803,7 +2803,7 @@ namespace Vanara.PInvoke [DefaultProperty(nameof(table))] public class MIB_IPADDRTABLE : SafeElementArray { - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// Amount of space, in bytes, to reserve. public MIB_IPADDRTABLE(uint byteSize) : base((int)byteSize, 0) { @@ -2959,7 +2959,7 @@ namespace Vanara.PInvoke [DefaultProperty(nameof(table))] public class MIB_TCP6TABLE_OWNER_PID : SafeElementArray { - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// Amount of space, in bytes, to reserve. public MIB_TCP6TABLE_OWNER_PID(uint byteSize) : base((int)byteSize, 0) { @@ -3013,7 +3013,7 @@ namespace Vanara.PInvoke [DefaultProperty(nameof(table))] public class MIB_TCPTABLE : SafeElementArray { - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// Amount of space, in bytes, to reserve. public MIB_TCPTABLE(uint byteSize) : base((int)byteSize, 0) { diff --git a/PInvoke/Kernel32/DateTimeApi.cs b/PInvoke/Kernel32/DateTimeApi.cs index 1ccdff1b..11209bb5 100644 --- a/PInvoke/Kernel32/DateTimeApi.cs +++ b/PInvoke/Kernel32/DateTimeApi.cs @@ -185,7 +185,7 @@ namespace Vanara.PInvoke // lpFormat, _Out_opt_ LPWSTR lpDateStr, _In_ int cchDate, _In_opt_ LPCWSTR lpCalendar); https://msdn.microsoft.com/en-us/library/windows/desktop/dd318088(v=vs.85).aspx [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true, CharSet = CharSet.Unicode)] [PInvokeData("Datetimeapi.h", MSDNShortId = "dd318088")] - public static extern int GetDateFormatEx(string lpLocaleName, DATE_FORMAT dwFlags, in SYSTEMTIME lpDate, string lpFormat, StringBuilder lpDateStr, int cchDate); + public static extern int GetDateFormatEx(string lpLocaleName, DATE_FORMAT dwFlags, in SYSTEMTIME lpDate, string lpFormat, StringBuilder lpDateStr, int cchDate, [Optional] string lpCalendar); /// /// Formats time as a time string for a locale specified by identifier. The function formats either a specified time or the local diff --git a/PInvoke/Kernel32/ErrHandlingApi.cs b/PInvoke/Kernel32/ErrHandlingApi.cs index a5a9b066..bc0a2dce 100644 --- a/PInvoke/Kernel32/ErrHandlingApi.cs +++ b/PInvoke/Kernel32/ErrHandlingApi.cs @@ -98,9 +98,7 @@ namespace Vanara.PInvoke } /// - /// Flags passed to the method. + /// Flags passed to the method. /// [PInvokeData("winbase.h")] [Flags] @@ -271,8 +269,8 @@ namespace Vanara.PInvoke /// FORMAT_MESSAGE_FROM_HMODULE0x00000800 /// /// The lpSource parameter is a module handle containing the message-table resource(s) to search. If this lpSource handle is NULL, - /// the current process's application image file will be searched. This flag cannot be used with - /// FORMAT_MESSAGE_FROM_STRING.If the module has no message table resource, the function fails with ERROR_RESOURCE_TYPE_NOT_FOUND. + /// the current process's application image file will be searched. This flag cannot be used with FORMAT_MESSAGE_FROM_STRING.If the + /// module has no message table resource, the function fails with ERROR_RESOURCE_TYPE_NOT_FOUND. /// /// /// @@ -414,7 +412,7 @@ namespace Vanara.PInvoke // LPTSTR lpBuffer, _In_ DWORD nSize, _In_opt_ va_list *Arguments); https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("WinBase.h", MSDNShortId = "ms679351")] - public static extern int FormatMessage(FormatMessageFlags dwFlags, HINSTANCE lpSource, uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer, uint nSize, string[] arguments); + public static extern int FormatMessage(FormatMessageFlags dwFlags, HINSTANCE lpSource, uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer, uint nSize, string[] Arguments); /// /// Formats a message string. The function requires a message definition as input. The message definition can come from a buffer @@ -460,8 +458,8 @@ namespace Vanara.PInvoke /// FORMAT_MESSAGE_FROM_HMODULE0x00000800 /// /// The lpSource parameter is a module handle containing the message-table resource(s) to search. If this lpSource handle is NULL, - /// the current process's application image file will be searched. This flag cannot be used with - /// FORMAT_MESSAGE_FROM_STRING.If the module has no message table resource, the function fails with ERROR_RESOURCE_TYPE_NOT_FOUND. + /// the current process's application image file will be searched. This flag cannot be used with FORMAT_MESSAGE_FROM_STRING.If the + /// module has no message table resource, the function fails with ERROR_RESOURCE_TYPE_NOT_FOUND. /// /// /// @@ -599,11 +597,9 @@ namespace Vanara.PInvoke /// /// If the function fails, the return value is zero. To get extended error information, call GetLastError. /// - // DWORD WINAPI FormatMessage( _In_ DWORD dwFlags, _In_opt_ LPCVOID lpSource, _In_ DWORD dwMessageId, _In_ DWORD dwLanguageId, _Out_ - // LPTSTR lpBuffer, _In_ DWORD nSize, _In_opt_ va_list *Arguments); https://msdn.microsoft.com/en-us/library/windows/desktop/ms679351(v=vs.85).aspx [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("WinBase.h", MSDNShortId = "ms679351")] - public static extern int FormatMessage(FormatMessageFlags dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer, uint nSize, string[] arguments); + public static extern int FormatMessage(FormatMessageFlags dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, ref IntPtr lpBuffer, uint nSize, string[] Arguments); /// /// Formats a message string. The function requires a message definition as input. The message definition can come from a buffer @@ -612,21 +608,20 @@ namespace Vanara.PInvoke /// in a message table resource based on a message identifier and a language identifier. The function copies the formatted message /// text to an output buffer, processing any embedded insert sequences if requested. /// - /// - /// + /// /// The formatting options, and how to interpret the lpSource parameter. The low-order byte of dwFlags specifies how the function /// handles line breaks in the output buffer. The low-order byte can also specify the maximum width of a formatted output line. /// /// This parameter can be one or more of the following values. /// - /// - /// - /// Value - /// Meaning - /// - /// - /// FORMAT_MESSAGE_ALLOCATE_BUFFER0x00000100 - /// + /// + /// + /// Value + /// Meaning + /// + /// + /// FORMAT_MESSAGE_ALLOCATE_BUFFER0x00000100 + /// /// The function allocates a buffer large enough to hold the formatted message, and places a pointer to the allocated buffer at the /// address specified by lpBuffer. The lpBuffer parameter is a pointer to an LPTSTR; you must cast the pointer to an LPTSTR (for /// example, ). The nSize parameter specifies the minimum number of TCHARs to allocate for an output message buffer. The caller @@ -637,104 +632,100 @@ namespace Vanara.PInvoke /// automatically fail with an error of ERROR_MORE_DATA.Windows 10: LocalAlloc() has different options: LMEM_FIXED, and LMEM_MOVABLE. /// FormatMessage() uses LMEM_FIXED, so HeapFree can be used. If LMEM_MOVABLE is used, HeapFree cannot be used. /// - /// - /// - /// FORMAT_MESSAGE_ARGUMENT_ARRAY0x00002000 - /// + /// + /// + /// FORMAT_MESSAGE_ARGUMENT_ARRAY0x00002000 + /// /// The Arguments parameter is not a va_list structure, but is a pointer to an array of values that represent the arguments.This flag /// cannot be used with 64-bit integer values. If you are using a 64-bit integer, you must use the va_list structure. /// - /// - /// - /// FORMAT_MESSAGE_FROM_HMODULE0x00000800 - /// + /// + /// + /// FORMAT_MESSAGE_FROM_HMODULE0x00000800 + /// /// The lpSource parameter is a module handle containing the message-table resource(s) to search. If this lpSource handle is NULL, - /// the current process's application image file will be searched. This flag cannot be used with - /// FORMAT_MESSAGE_FROM_STRING.If the module has no message table resource, the function fails with ERROR_RESOURCE_TYPE_NOT_FOUND. + /// the current process's application image file will be searched. This flag cannot be used with FORMAT_MESSAGE_FROM_STRING.If the + /// module has no message table resource, the function fails with ERROR_RESOURCE_TYPE_NOT_FOUND. /// - /// - /// - /// FORMAT_MESSAGE_FROM_STRING0x00000400 - /// + /// + /// + /// FORMAT_MESSAGE_FROM_STRING0x00000400 + /// /// The lpSource parameter is a pointer to a null-terminated string that contains a message definition. The message definition may /// contain insert sequences, just as the message text in a message table resource may. This flag cannot be used with /// FORMAT_MESSAGE_FROM_HMODULE or FORMAT_MESSAGE_FROM_SYSTEM. /// - /// - /// - /// FORMAT_MESSAGE_FROM_SYSTEM0x00001000 - /// + /// + /// + /// FORMAT_MESSAGE_FROM_SYSTEM0x00001000 + /// /// The function should search the system message-table resource(s) for the requested message. If this flag is specified with /// FORMAT_MESSAGE_FROM_HMODULE, the function searches the system message table if the message is not found in the module specified /// by lpSource. This flag cannot be used with FORMAT_MESSAGE_FROM_STRING.If this flag is specified, an application can pass the /// result of the GetLastError function to retrieve the message text for a system-defined error. /// - /// - /// - /// FORMAT_MESSAGE_IGNORE_INSERTS0x00000200 - /// + /// + /// + /// FORMAT_MESSAGE_IGNORE_INSERTS0x00000200 + /// /// Insert sequences in the message definition are to be ignored and passed through to the output buffer unchanged. This flag is /// useful for fetching a message for later formatting. If this flag is set, the Arguments parameter is ignored. /// - /// - /// + /// + /// /// /// /// The low-order byte of dwFlags can specify the maximum width of a formatted output line. The following are possible values of the /// low-order byte. /// /// - /// - /// - /// Value - /// Meaning - /// - /// - /// 0 - /// + /// + /// + /// Value + /// Meaning + /// + /// + /// 0 + /// /// There are no output line width restrictions. The function stores line breaks that are in the message definition text into the /// output buffer. /// - /// - /// - /// FORMAT_MESSAGE_MAX_WIDTH_MASK0x000000FF - /// + /// + /// + /// FORMAT_MESSAGE_MAX_WIDTH_MASK0x000000FF + /// /// The function ignores regular line breaks in the message definition text. The function stores hard-coded line breaks in the /// message definition text into the output buffer. The function generates no new line breaks. /// - /// - /// + /// + /// /// /// /// If the low-order byte is a nonzero value other than FORMAT_MESSAGE_MAX_WIDTH_MASK, it specifies the maximum number of /// characters in an output line. The function ignores regular line breaks in the message definition text. The function never splits /// a string delimited by white space across a line break. The function stores hard-coded line breaks in the message definition text /// into the output buffer. Hard-coded line breaks are coded with the %n escape sequence. - /// - /// - /// - /// The location of the message definition. The type of this parameter depends upon the settings in the dwFlags parameter. + /// + /// The location of the message definition. The type of this parameter depends upon the settings in the dwFlags parameter. /// - /// - /// - /// dwFlags Setting - /// Meaning - /// - /// - /// FORMAT_MESSAGE_FROM_HMODULE0x00000800 - /// A handle to the module that contains the message table to search. - /// - /// - /// FORMAT_MESSAGE_FROM_STRING0x00000400 - /// Pointer to a string that consists of unformatted message text. It will be scanned for inserts and formatted accordingly. - /// - /// + /// + /// + /// dwFlags Setting + /// Meaning + /// + /// + /// FORMAT_MESSAGE_FROM_HMODULE0x00000800 + /// A handle to the module that contains the message table to search. + /// + /// + /// FORMAT_MESSAGE_FROM_STRING0x00000400 + /// Pointer to a string that consists of unformatted message text. It will be scanned for inserts and formatted accordingly. + /// + /// /// - /// If neither of these flags is set in dwFlags, then lpSource is ignored. - /// + /// If neither of these flags is set in dwFlags, then lpSource is ignored. /// The message identifier for the requested message. This parameter is ignored if dwFlags includes FORMAT_MESSAGE_FROM_STRING. - /// - /// The language identifier for the requested message. This parameter is ignored if dwFlags includes FORMAT_MESSAGE_FROM_STRING. + /// The language identifier for the requested message. This parameter is ignored if dwFlags includes FORMAT_MESSAGE_FROM_STRING. /// /// If you pass a specific LANGID in this parameter, FormatMessage will return a message for that LANGID only. /// If the function cannot find a message for that LANGID, it sets Last-Error to ERROR_RESOURCE_LANG_NOT_FOUND. If you @@ -743,25 +734,20 @@ namespace Vanara.PInvoke /// /// If FormatMessage does not locate a message for any of the preceding LANGIDs, it returns any language message string /// that is present. If that fails, it returns ERROR_RESOURCE_LANG_NOT_FOUND. - /// - /// - /// - /// + /// + /// /// A pointer to a buffer that receives the null-terminated string that specifies the formatted message. If dwFlags includes /// FORMAT_MESSAGE_ALLOCATE_BUFFER, the function allocates a buffer using the LocalAlloc function, and places the /// pointer to the buffer at the address specified in lpBuffer. /// - /// This buffer cannot be larger than 64K bytes. - /// - /// - /// + /// This buffer cannot be larger than 64K bytes. + /// /// If the FORMAT_MESSAGE_ALLOCATE_BUFFER flag is not set, this parameter specifies the size of the output buffer, in /// TCHARs. If FORMAT_MESSAGE_ALLOCATE_BUFFER is set, this parameter specifies the minimum number of TCHARs to /// allocate for an output buffer. /// - /// The output buffer cannot be larger than 64K bytes. - /// - /// + /// The output buffer cannot be larger than 64K bytes. + /// /// /// An array of values that are used as insert values in the formatted message. A %1 in the format string indicates the first value /// in the Arguments array; a %2 indicates the second argument; and so on. diff --git a/PInvoke/Kernel32/FileApi.cs b/PInvoke/Kernel32/FileApi.cs index e209b5ca..8f7a8faf 100644 --- a/PInvoke/Kernel32/FileApi.cs +++ b/PInvoke/Kernel32/FileApi.cs @@ -24,7 +24,7 @@ namespace Vanara.PInvoke /// A value returned when invalid file attributes are found. [PInvokeData("fileapi.h")] public const int INVALID_FILE_ATTRIBUTES = -2; - /// A value returned by when the function fails. + /// A value returned by when the function fails. [PInvokeData("fileapi.h")] public const uint INVALID_FILE_SIZE = 0xFFFFFFFF; /// A value returned then a file pointer cannot be set. diff --git a/PInvoke/Kernel32/HandleApi.cs b/PInvoke/Kernel32/HandleApi.cs index f6aef9c0..96b3852d 100644 --- a/PInvoke/Kernel32/HandleApi.cs +++ b/PInvoke/Kernel32/HandleApi.cs @@ -101,8 +101,8 @@ namespace Vanara.PInvoke /// handle to a process or thread, respectively. /// /// - public static IntPtr Duplicate(this IKernelHandle sourceHandle, bool bInheritHandle = true, DUPLICATE_HANDLE_OPTIONS dwOptions = DUPLICATE_HANDLE_OPTIONS.DUPLICATE_SAME_ACCESS, uint dwDesiredAccess = 0) => - DuplicateHandle(GetCurrentProcess(), sourceHandle.DangerousGetHandle(), GetCurrentProcess(), out var h, dwDesiredAccess, bInheritHandle, dwOptions) ? h : IntPtr.Zero; + public static IntPtr Duplicate(this IKernelHandle hSourceHandle, bool bInheritHandle = true, DUPLICATE_HANDLE_OPTIONS dwOptions = DUPLICATE_HANDLE_OPTIONS.DUPLICATE_SAME_ACCESS, uint dwDesiredAccess = 0) => + DuplicateHandle(GetCurrentProcess(), hSourceHandle.DangerousGetHandle(), GetCurrentProcess(), out var h, dwDesiredAccess, bInheritHandle, dwOptions) ? h : IntPtr.Zero; /// Duplicates an object handle. /// diff --git a/PInvoke/Kernel32/HeapApi.cs b/PInvoke/Kernel32/HeapApi.cs index 9d19db6e..7a72c16d 100644 --- a/PInvoke/Kernel32/HeapApi.cs +++ b/PInvoke/Kernel32/HeapApi.cs @@ -1149,7 +1149,6 @@ namespace Vanara.PInvoke /// Allocates from unmanaged memory to represent an array of pointers and marshals the unmanaged pointers (IntPtr) to the native /// array equivalent. /// - /// A handle to a heap created using or . /// Array of unmanaged pointers /// SafeHGlobalHandle object to an native (unmanaged) array of pointers public SafeHeapBlock(byte[] bytes) : base(bytes) { } diff --git a/PInvoke/Kernel32/IoApiSet.cs b/PInvoke/Kernel32/IoApiSet.cs index 151338df..43110eed 100644 --- a/PInvoke/Kernel32/IoApiSet.cs +++ b/PInvoke/Kernel32/IoApiSet.cs @@ -806,7 +806,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)] [PInvokeData("WinBase.h", MSDNShortId = "aa364986")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern unsafe bool GetQueuedCompletionStatus([In] IntPtr CompletionPort, out uint lpNumberOfBytesTransferred, out uint lpCompletionKey, NativeOverlapped** lpOverlapped, uint dwMilliseconds); + public static extern unsafe bool GetQueuedCompletionStatus([In] IntPtr CompletionPort, out uint lpNumberOfBytes, out uint lpCompletionKey, NativeOverlapped** lpOverlapped, uint dwMilliseconds); /// /// diff --git a/PInvoke/Kernel32/JobApi.cs b/PInvoke/Kernel32/JobApi.cs index 59cd853d..44caef96 100644 --- a/PInvoke/Kernel32/JobApi.cs +++ b/PInvoke/Kernel32/JobApi.cs @@ -670,7 +670,7 @@ namespace Vanara.PInvoke // HANDLE WINAPI OpenJobObject( _In_ DWORD dwDesiredAccess, _In_ BOOL bInheritHandles, _In_ LPCTSTR lpName); https://msdn.microsoft.com/en-us/library/windows/desktop/ms684312(v=vs.85).aspx [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("WinBase.h", MSDNShortId = "ms684312")] - public static extern HJOB OpenJobObject(uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, string lpName); + public static extern HJOB OpenJobObject(uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandles, string lpName); /// Retrieves limit and job state information from the job object. /// @@ -810,8 +810,8 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)] [PInvokeData("WinBase.h", MSDNShortId = "ms684925")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool QueryInformationJobObject([In] HJOB hJob, JOBOBJECTINFOCLASS JobObjectInformationClass, IntPtr lpJobObjectInformation, - uint cbJobObjectInformationLength, out uint lpReturnLength); + public static extern bool QueryInformationJobObject([In] HJOB hJob, JOBOBJECTINFOCLASS JobObjectInfoClass, IntPtr lpJobObjectInfo, + uint cbJobObjectInfoLength, out uint lpReturnLength); /// Gets information about the control of the I/O rate for a job object. /// @@ -962,7 +962,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)] [PInvokeData("WinBase.h", MSDNShortId = "ms686216")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool SetInformationJobObject([In] HJOB hJob, JOBOBJECTINFOCLASS JobObjectInformationClass, [In] IntPtr lpJobObjectInformation, uint cbJobObjectInformationLength); + public static extern bool SetInformationJobObject([In] HJOB hJob, JOBOBJECTINFOCLASS JobObjectInfoClass, [In] IntPtr lpJobObjectInfo, uint cbJobObjectInfoLength); /// Sets I/O limits on a job object. /// diff --git a/PInvoke/Kernel32/LibLoaderApi.cs b/PInvoke/Kernel32/LibLoaderApi.cs index e16db17c..d2a343ff 100644 --- a/PInvoke/Kernel32/LibLoaderApi.cs +++ b/PInvoke/Kernel32/LibLoaderApi.cs @@ -167,7 +167,7 @@ namespace Vanara.PInvoke GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 0x00000004, } - /// Flags that may be passed to the function. + /// Flags that may be passed to the function. [PInvokeData("libloaderapi.h")] [Flags] public enum LoadLibraryExFlags diff --git a/PInvoke/Kernel32/MemoryApi.cs b/PInvoke/Kernel32/MemoryApi.cs index 9862fe88..73b9eb71 100644 --- a/PInvoke/Kernel32/MemoryApi.cs +++ b/PInvoke/Kernel32/MemoryApi.cs @@ -2970,7 +2970,7 @@ namespace Vanara.PInvoke /// Provides a to a memory resource notification object that releases its instance at disposal using CloseHandle. public class SafeMemoryResourceNotification : SafeSyncHandle { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// to reliably release the handle during the finalization phase; otherwise, (not recommended). public SafeMemoryResourceNotification(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } diff --git a/PInvoke/Kernel32/NamedPipeApi.cs b/PInvoke/Kernel32/NamedPipeApi.cs index e4747ebe..e4870139 100644 --- a/PInvoke/Kernel32/NamedPipeApi.cs +++ b/PInvoke/Kernel32/NamedPipeApi.cs @@ -58,7 +58,7 @@ namespace Vanara.PInvoke PIPE_NOWAIT = 0x00000001, /// Data is read from the pipe as a stream of bytes. This mode can be used with either PIPE_TYPE_MESSAGE or PIPE_TYPE_BYTE. PIPE_READMODE_BYTE = 0x00000000, - /// Data is read from the pipe as a stream of messages. This mode can be only used if PIPE_TYPE_MESSAGE is also specified./summary> + /// Data is read from the pipe as a stream of messages. This mode can be only used if PIPE_TYPE_MESSAGE is also specified. PIPE_READMODE_MESSAGE = 0x00000002, /// /// Data is written to the pipe as a stream of bytes. This mode cannot be used with PIPE_READMODE_MESSAGE. The pipe does not distinguish bytes diff --git a/PInvoke/Kernel32/ProcessEnv.cs b/PInvoke/Kernel32/ProcessEnv.cs index c065dd81..d3ea2fb1 100644 --- a/PInvoke/Kernel32/ProcessEnv.cs +++ b/PInvoke/Kernel32/ProcessEnv.cs @@ -357,7 +357,7 @@ namespace Vanara.PInvoke /// Represents a block of environment strings obtained by and freed by . /// - /// + /// public sealed class EnvironmentStrings : GenericSafeHandle, IEnumerable { /// Initializes a new instance of the class. diff --git a/PInvoke/Kernel32/SynchApi.cs b/PInvoke/Kernel32/SynchApi.cs index 3c9d3ba9..374493a4 100644 --- a/PInvoke/Kernel32/SynchApi.cs +++ b/PInvoke/Kernel32/SynchApi.cs @@ -171,7 +171,7 @@ namespace Vanara.PInvoke SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE = 0x04, } - /// Values returned by . + /// Values returned by . public enum WAIT_STATUS : uint { /// @@ -2245,7 +2245,7 @@ namespace Vanara.PInvoke private static readonly SafeEventHandle nullEvent = new SafeEventHandle(IntPtr.Zero, false); - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). diff --git a/PInvoke/Kernel32/SysInfoApi.cs b/PInvoke/Kernel32/SysInfoApi.cs index 8cbc2b5d..89c46475 100644 --- a/PInvoke/Kernel32/SysInfoApi.cs +++ b/PInvoke/Kernel32/SysInfoApi.cs @@ -622,7 +622,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winbase.h", MSDNShortId = "ms724295")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool GetComputerName(StringBuilder lpBuffer, ref uint nSize); + public static extern bool GetComputerName(StringBuilder lpBuffer, ref uint lpnSize); public static bool GetComputerName(out string name) => CallMethodWithStrBuf((StringBuilder sb, ref uint sz) => GetComputerName(sb, ref sz), out name); @@ -1772,7 +1772,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winbase.h", MSDNShortId = "ms724451")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool GetVersionEx(out OSVERSIONINFOEX lpVersionInformation); + public static extern bool GetVersionEx(out OSVERSIONINFOEX lpVersionInfo); /// /// Retrieves the path of the Windows directory. @@ -2155,7 +2155,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winbase.h", MSDNShortId = "ms725492")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool VerifyVersionInfo(ref OSVERSIONINFOEX lpVersionInformation, VERSION_MASK dwTypeMask, ulong dwlConditionMask); + public static extern bool VerifyVersionInfo(ref OSVERSIONINFOEX lpVersionInfo, VERSION_MASK dwTypeMask, ulong dwlConditionMask); /// /// Sets the bits of a 64-bit value to indicate the comparison operator to use for a specified operating system version attribute. diff --git a/PInvoke/Kernel32/TimeZoneApi.cs b/PInvoke/Kernel32/TimeZoneApi.cs index f6dbefe9..d5a7c397 100644 --- a/PInvoke/Kernel32/TimeZoneApi.cs +++ b/PInvoke/Kernel32/TimeZoneApi.cs @@ -249,7 +249,7 @@ namespace Vanara.PInvoke /// A pointer to a SYSTEMTIME structure that specifies the UTC time to be converted. The function converts this universal time to the specified /// time zone's corresponding local time. /// - /// A pointer to a SYSTEMTIME structure that receives the local time. + /// A pointer to a SYSTEMTIME structure that receives the local time. /// If the function fails, the return value is zero. To get extended error information, call GetLastError. // BOOL WINAPI SystemTimeToTzSpecificLocalTimeEx( _In_opt_ const DYNAMIC_TIME_ZONE_INFORMATION* lpTimeZoneInformation, _In_ const SYSTEMTIME* // lpUniversalTime, _Out_ LPSYSTEMTIME lpLocalTime ); https://msdn.microsoft.com/en-us/library/windows/desktop/jj206642(v=vs.85).aspx diff --git a/PInvoke/Kernel32/WinBase.App.cs b/PInvoke/Kernel32/WinBase.App.cs index 3e1bfdaf..692aaaa0 100644 --- a/PInvoke/Kernel32/WinBase.App.cs +++ b/PInvoke/Kernel32/WinBase.App.cs @@ -280,7 +280,7 @@ namespace Vanara.PInvoke // HANDLE CreateActCtx( _Inout_ PACTCTX pActCtx); https://msdn.microsoft.com/en-us/library/windows/desktop/aa375125(v=vs.85).aspx [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Winbase.h", MSDNShortId = "aa375125")] - public static extern SafeHACTCTX CreateActCtx(in ACTCTX actctx); + public static extern SafeHACTCTX CreateActCtx(in ACTCTX pActCtx); /// The DeactivateActCtx function deactivates the activation context corresponding to the specified cookie. /// @@ -513,7 +513,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, ExactSpelling = true)] [PInvokeData("Winbase.h", MSDNShortId = "aa375152")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool GetCurrentActCtx(out HACTCTX handle); + public static extern bool GetCurrentActCtx(out HACTCTX lphActCtx); /// /// The QueryActCtxSettingsW function specifies the activation context, and the namespace and name of the attribute that is to be queried. diff --git a/PInvoke/Kernel32/WinBase.File.cs b/PInvoke/Kernel32/WinBase.File.cs index e923551c..5de7ba1f 100644 --- a/PInvoke/Kernel32/WinBase.File.cs +++ b/PInvoke/Kernel32/WinBase.File.cs @@ -2518,6 +2518,7 @@ namespace Vanara.PInvoke /// The method that gets the first value. /// The method that gets the next value. /// The string buffer length. + /// The error value that indicates the enumeration has completed. /// List of strings returned by and methods. private static IEnumerable EnumFindMethods(FindFirstDelegate first, FindNextDelegate next, uint strSz = MAX_PATH + 1, int done = Win32Error.ERROR_HANDLE_EOF) where THandle : SafeHandle { diff --git a/PInvoke/Kernel32/WinBase.Mailslot.cs b/PInvoke/Kernel32/WinBase.Mailslot.cs index d953db9d..8d2b8909 100644 --- a/PInvoke/Kernel32/WinBase.Mailslot.cs +++ b/PInvoke/Kernel32/WinBase.Mailslot.cs @@ -144,14 +144,14 @@ namespace Vanara.PInvoke /// public class SafeMailslotHandle : SafeKernelHandle { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// public SafeMailslotHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafeMailslotHandle() : base() { } } } diff --git a/PInvoke/Kernel32/WinBase.ProcessThread.cs b/PInvoke/Kernel32/WinBase.ProcessThread.cs index f5bf6eac..abda2725 100644 --- a/PInvoke/Kernel32/WinBase.ProcessThread.cs +++ b/PInvoke/Kernel32/WinBase.ProcessThread.cs @@ -14,7 +14,7 @@ namespace Vanara.PInvoke // VOID CALLBACK FiberProc( _In_ PVOID lpParameter); https://msdn.microsoft.com/en-us/library/windows/desktop/ms682660(v=vs.85).aspx [UnmanagedFunctionPointer(CallingConvention.Winapi)] [PInvokeData("WinBase.h", MSDNShortId = "ms682660")] - public delegate void FiberProc(IntPtr lpFiberParameter); + public delegate void FiberProc(IntPtr lpParameter); /// The thread's execution requirements. public enum EXECUTION_STATE : uint diff --git a/PInvoke/Kernel32/WinBase.cs b/PInvoke/Kernel32/WinBase.cs index a8e0b25b..f275a32d 100644 --- a/PInvoke/Kernel32/WinBase.cs +++ b/PInvoke/Kernel32/WinBase.cs @@ -7634,14 +7634,14 @@ namespace Vanara.PInvoke /// Provides a to a that releases a created PowerRequestObject instance at disposal using CloseHandle. public class SafePowerRequestObject : SafeKernelHandle { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// public SafePowerRequestObject(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafePowerRequestObject() : base() { } } @@ -7650,14 +7650,14 @@ namespace Vanara.PInvoke /// public class SafePUMS_COMPLETION_LIST : HANDLE { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// public SafePUMS_COMPLETION_LIST(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafePUMS_COMPLETION_LIST() : base() { } /// @@ -7669,14 +7669,14 @@ namespace Vanara.PInvoke /// public class SafePUMS_CONTEXT : HANDLE { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// public SafePUMS_CONTEXT(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafePUMS_CONTEXT() : base() { } /// diff --git a/PInvoke/Kernel32/WinCon.cs b/PInvoke/Kernel32/WinCon.cs index a970c465..cab27e3d 100644 --- a/PInvoke/Kernel32/WinCon.cs +++ b/PInvoke/Kernel32/WinCon.cs @@ -333,8 +333,10 @@ namespace Vanara.PInvoke /// CONSOLE_FULLSCREEN = 1, - /// Full-screen console communicating directly with the video hardware. This mode is set after the console is in - /// CONSOLE_FULLSCREEN mode to indicate that the transition to full-screen mode has completed./summary> + /// + /// Full-screen console communicating directly with the video hardware. This mode is set after the console is in + /// CONSOLE_FULLSCREEN mode to indicate that the transition to full-screen mode has completed. + /// CONSOLE_FULLSCREEN_HARDWARE = 2 } @@ -632,7 +634,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Wincon.h", MSDNShortId = "")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool GetConsoleAlias(string Source, StringBuilder TargetBuffer, uint TargetBufferLength, string ExeName); + public static extern bool GetConsoleAlias(string lpSource, StringBuilder lpTargetBuffer, uint TargetBufferLength, string lpExeName); /// Retrieves all defined console aliases for the specified executable. /// @@ -652,7 +654,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("Wincon.h", MSDNShortId = "")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool GetConsoleAliases(StringBuilder AliasBuffer, uint AliasBufferLength, string ExeName); + public static extern bool GetConsoleAliases(StringBuilder lpAliasBuffer, uint AliasBufferLength, string lpExeName); /// Retrieves the required size for the buffer used by the GetConsoleAliases function. /// The name of the executable file whose console aliases are to be retrieved. diff --git a/PInvoke/Kernel32/WinNls.cs b/PInvoke/Kernel32/WinNls.cs index 149f97a9..885069dd 100644 --- a/PInvoke/Kernel32/WinNls.cs +++ b/PInvoke/Kernel32/WinNls.cs @@ -848,7 +848,7 @@ namespace Vanara.PInvoke /// Language Group Identifier. public enum LGRPID : uint { - /// Western Europe & U.S. + /// Western Europe and U.S. LGRPID_WESTERN_EUROPE = 0x0001, /// Central Europe diff --git a/PInvoke/Mpr/Winnetwk.cs b/PInvoke/Mpr/Winnetwk.cs index b07c6193..19c20870 100644 --- a/PInvoke/Mpr/Winnetwk.cs +++ b/PInvoke/Mpr/Winnetwk.cs @@ -3258,12 +3258,12 @@ namespace Vanara.PInvoke /// Provides a to a WNet enumeration that releases a created WNetEnumHandle instance at disposal using WNetCloseEnum. public class SafeWNetEnumHandle : HANDLE { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// to reliably release the handle during the finalization phase; otherwise, (not recommended). public SafeWNetEnumHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafeWNetEnumHandle() : base() { } /// diff --git a/PInvoke/NTDSApi/DsParse.cs b/PInvoke/NTDSApi/DsParse.cs index 5642d95e..10d20b48 100644 --- a/PInvoke/NTDSApi/DsParse.cs +++ b/PInvoke/NTDSApi/DsParse.cs @@ -39,7 +39,6 @@ namespace Vanara.PInvoke /// components are optional. The <port number> component must be a numeric string value. /// /// - /// /// /// /// Pointer to a DWORD value that, on entry, contains the size, in TCHARs, of the ServiceClass buffer, including the @@ -224,9 +223,10 @@ namespace Vanara.PInvoke /// The DsGetRdnW function retrieves the key and value of the first relative distinguished name and a pointer to the next /// relative distinguished name from a distinguished name string. /// - /// Address of a string that contains the distinguished name string to be parsed. - /// A string that, if the function succeeds, receives the key in the relative distinguished name string. - /// A string that, if the function is successful, receives the value in the relative distinguished name string. + /// Address of a string that contains the distinguished name string to be parsed. + /// A string that recieves the remainder of the distinguished name exclusive of current relative distinguished name. + /// A string that, if the function succeeds, receives the key in the relative distinguished name string. + /// A string that, if the function is successful, receives the value in the relative distinguished name string. /// Returns ERROR_SUCCESS if successful or a Win32 error code otherwise. [PInvokeData("dsparse.h", MSDNShortId = "22627f2e-adfb-49de-bae5-20aaf69830ac")] public static Win32Error DsGetRdnW(string fullDN, out string dn, out string key, out string val) diff --git a/PInvoke/NTDSApi/NTDSAPI.cs b/PInvoke/NTDSApi/NTDSAPI.cs index 384cabd2..9578218e 100644 --- a/PInvoke/NTDSApi/NTDSAPI.cs +++ b/PInvoke/NTDSApi/NTDSAPI.cs @@ -842,27 +842,28 @@ namespace Vanara.PInvoke /// Identifies the format of the SPNs to compose. The ServiceType parameter can have one of the following values. /// DS_SPN_DNS_HOST, DS_SPN_DN_HOST, DS_SPN_NB_HOST /// The SPNs have the following format. - /// - /// - /// - /// The ServiceName parameter must be NULL. This is the SPN format for a host-based service, which provides services - /// identified with its host computer. The InstancePort component is optional. - /// + /// The + /// ServiceName + /// parameter must be + /// NULL + /// . This is the SPN format for a host-based service, which provides services identified with its host computer. The + /// InstancePort + /// component is optional. /// DS_SPN_DOMAIN, DS_SPN_NB_DOMAIN /// The SPNs have the following format. - /// - /// + /// The + /// ServiceName /// - /// The ServiceName parameter must be the DNS name or DN of a domain. This format is used for a replicable service that provides - /// services to the specified domain. + /// parameter must be the DNS name or DN of a domain. This format is used for a replicable service that provides services to the + /// specified domain. /// /// DS_SPN_SERVICE /// The SPNs have the following format. - /// - /// + /// The + /// ServiceName /// - /// The ServiceName parameter must be a canonical DN or DNS name that identifies an instance of the service. For example, it could be - /// a DNS name of a SRV record, or the distinguished name of the service connection point for this service instance. + /// parameter must be a canonical DN or DNS name that identifies an instance of the service. For example, it could be a DNS name of a + /// SRV record, or the distinguished name of the service connection point for this service instance. /// /// /// @@ -941,9 +942,8 @@ namespace Vanara.PInvoke /// to authenticate the service. /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/ntdsapi/nf-ntdsapi-dsgetspna NTDSAPI DWORD DsGetSpnA( DS_SPN_NAME_TYPE - // ServiceType, LPCSTR ServiceClass, LPCSTR ServiceName, USHORT InstancePort, USHORT cInstanceNames, LPCSTR *pInstanceNames, const - // USHORT *pInstancePorts, DWORD *pcSpn, LPSTR **prpszSpn ); + // https://docs.microsoft.com/en-us/windows/desktop/api/ntdsapi/nf-ntdsapi-dsgetspna + // NTDSAPI DWORD DsGetSpnA( DS_SPN_NAME_TYPE ServiceType, LPCSTR ServiceClass, LPCSTR ServiceName, USHORT InstancePort, USHORT cInstanceNames, LPCSTR *pInstanceNames, const USHORT *pInstancePorts, DWORD *pcSpn, LPSTR **prpszSpn ); [DllImport(Lib.NTDSApi, SetLastError = false, CharSet = CharSet.Auto)] [PInvokeData("ntdsapi.h", MSDNShortId = "cbd53850-9b05-4f74-ab07-30dcad583fc5")] public static extern Win32Error DsGetSpn(DS_SPN_NAME_TYPE ServiceType, string ServiceClass, string ServiceName, ushort InstancePort, ushort cInstanceNames, diff --git a/PInvoke/NTDll/NTDll.cs b/PInvoke/NTDll/NTDll.cs index 48158ba8..c53464ef 100644 --- a/PInvoke/NTDll/NTDll.cs +++ b/PInvoke/NTDll/NTDll.cs @@ -2007,12 +2007,12 @@ namespace Vanara.PInvoke /// Provides a to a resource manager that releases its handle at disposal using NTClose. public class SafeResourceManagerHandle : SafeNtHandle { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// to reliably release the handle during the finalization phase; otherwise, (not recommended). public SafeResourceManagerHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafeResourceManagerHandle() : base() { } } @@ -2818,6 +2818,7 @@ namespace Vanara.PInvoke /// /// The size of the buffer pointed to by the SystemInformationparameter, in bytes. /// + /// /// /// Returns an NTSTATUS success or error code. /// @@ -4136,12 +4137,12 @@ namespace Vanara.PInvoke /// Provides a to an object that releases a created handle at disposal using NtClose. public abstract class SafeNtHandle : HANDLE { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// to reliably release the handle during the finalization phase; otherwise, (not recommended). public SafeNtHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. protected SafeNtHandle() : base() { } #pragma warning disable CS0612 // Type or member is obsolete diff --git a/PInvoke/NetApi32/DsGetDC.cs b/PInvoke/NetApi32/DsGetDC.cs index 37ee2aa5..d80b720a 100644 --- a/PInvoke/NetApi32/DsGetDC.cs +++ b/PInvoke/NetApi32/DsGetDC.cs @@ -125,7 +125,7 @@ namespace Vanara.PInvoke DS_DOMAIN_DIRECT_INBOUND = 0x0020, } - /// Flags supporting behavior of . + /// Flags supporting behavior of . [Flags] [PInvokeData("DsGetDC.h", MSDNShortId = "ms675983")] public enum DsGetDcNameFlags : uint @@ -1279,14 +1279,14 @@ namespace Vanara.PInvoke /// public class SafeDCEnumHandle : HANDLE { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// public SafeDCEnumHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafeDCEnumHandle() : base() { } /// diff --git a/PInvoke/NetApi32/Lm.cs b/PInvoke/NetApi32/Lm.cs index 859490b6..3dbf3429 100644 --- a/PInvoke/NetApi32/Lm.cs +++ b/PInvoke/NetApi32/Lm.cs @@ -2319,14 +2319,14 @@ namespace Vanara.PInvoke /// Provides a to a buffer that releases a created handle at disposal using NetApiBufferFree. public class SafeNetApiBuffer : HANDLE { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// public SafeNetApiBuffer(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafeNetApiBuffer() : base() { } /// Returns an extracted structure from this buffer. diff --git a/PInvoke/Ole/Ole32/PropIdl.cs b/PInvoke/Ole/Ole32/PropIdl.cs index 30eee55a..38f96fdd 100644 --- a/PInvoke/Ole/Ole32/PropIdl.cs +++ b/PInvoke/Ole/Ole32/PropIdl.cs @@ -333,30 +333,9 @@ namespace Vanara.PInvoke /// point later. The new enumerator supports the same IEnumSTATPROPSTG interface. /// /// - /// + /// /// A pointer to the variable that receives the IEnumSTATPROPSTG interface pointer. /// If the method is unsuccessful, the value of the parameter is undefined. - /// - /// - /// This method supports the following return values. - /// - /// - /// Return code - /// Description - /// - /// - /// E_INVALIDARG - /// The parameter is NULL. - /// - /// - /// E_OUTOFMEMORY - /// Insufficient memory. - /// - /// - /// E_UNEXPECTED - /// An unexpected exception occurred. - /// - /// /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-clone IEnumSTATPROPSTG Clone(); @@ -455,7 +434,7 @@ namespace Vanara.PInvoke /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertysetstorage-create [PreserveSig] - HRESULT Create(in Guid rfmtid, [In] IntPtr pclsid, [In] STGM grfFlags, [In] STGM grfMode, out IPropertyStorage propertyStorage); + HRESULT Create(in Guid rfmtid, [In] IntPtr pclsid, [In] STGM grfFlags, [In] STGM grfMode, out IPropertyStorage ppprstg); /// /// The Open method opens a property set contained in the property set storage object. @@ -551,7 +530,7 @@ namespace Vanara.PInvoke /// // https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ipropertysetstorage-open [PreserveSig] - HRESULT Open(in Guid rfmtid, [In] STGM grfMode, out IPropertyStorage propertyStorage); + HRESULT Open(in Guid rfmtid, [In] STGM grfMode, out IPropertyStorage ppprstg); /// /// The Delete method deletes one of the property sets contained in the property set storage object. diff --git a/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs b/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs index 7859302c..4433802c 100644 --- a/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs +++ b/PInvoke/Ole/OleAut32/OleAuto.SAFEARRAY.cs @@ -533,7 +533,7 @@ namespace Vanara.PInvoke // VARTYPE vt, LONG lLbound, ULONG cElements ); [DllImport(Lib.OleAut32, SetLastError = false, ExactSpelling = true)] [PInvokeData("oleauto.h", MSDNShortId = "b794b8c6-a523-4636-8681-a936dff3fc6f")] - public static extern SafeSAFEARRAY SafeArrayCreateVector(VARTYPE vt, int lowerBound, uint cElems); + public static extern SafeSAFEARRAY SafeArrayCreateVector(VARTYPE vt, int lLbound, uint cElements); /// /// Creates and returns a one-dimensional safe array of the specified VARTYPE and bounds. @@ -834,7 +834,7 @@ namespace Vanara.PInvoke // *psa ); [DllImport(Lib.OleAut32, SetLastError = false, ExactSpelling = true)] [PInvokeData("oleauto.h", MSDNShortId = "27bd4a3f-0e9d-45f7-ad7c-0c0b59579dd0")] - public static extern int SafeArrayGetElemsize(SafeSAFEARRAY pSafeArray); + public static extern int SafeArrayGetElemsize(SafeSAFEARRAY psa); /// /// Gets the GUID of the interface contained within the specified safe array. diff --git a/PInvoke/Security/AdvApi32/AccCtrl.cs b/PInvoke/Security/AdvApi32/AccCtrl.cs index 58644292..02d2c257 100644 --- a/PInvoke/Security/AdvApi32/AccCtrl.cs +++ b/PInvoke/Security/AdvApi32/AccCtrl.cs @@ -139,8 +139,7 @@ namespace Vanara.PInvoke /// /// Indicates an access right that applies only to containers. If this flag is set, the access right is displayed on the basic - /// security page only if the specifies the - /// SI_CONTAINER flag. + /// security page only if the SI_CONTAINER flag is also set. /// SI_ACCESS_CONTAINER = 0x00040000, diff --git a/PInvoke/Security/AdvApi32/AclApi.cs b/PInvoke/Security/AdvApi32/AclApi.cs index 074725e1..994d8bff 100644 --- a/PInvoke/Security/AdvApi32/AclApi.cs +++ b/PInvoke/Security/AdvApi32/AclApi.cs @@ -1202,8 +1202,6 @@ namespace Vanara.PInvoke /// A pointer to the function used to track the progress of the TreeResetNamedSecurityInfo function. The prototype of the /// progress function is: /// - /// - /// /// /// The progress function provides the caller with progress and error information when nodes are processed. The caller specifies the /// progress function in fnProgress, and during the tree operation, TreeResetNamedSecurityInfo passes the name of the last @@ -1352,8 +1350,6 @@ namespace Vanara.PInvoke /// A pointer to the function used to track the progress of the TreeSetNamedSecurityInfo function. The prototype of the /// progress function is: /// - /// - /// /// /// The progress function provides the caller with progress and error information when nodes are processed. The caller specifies the /// progress function in fnProgress, and during the tree operation, TreeSetNamedSecurityInfo passes the name of the last diff --git a/PInvoke/Security/AdvApi32/NTSecApi.cs b/PInvoke/Security/AdvApi32/NTSecApi.cs index 666dc7b4..f46dc97a 100644 --- a/PInvoke/Security/AdvApi32/NTSecApi.cs +++ b/PInvoke/Security/AdvApi32/NTSecApi.cs @@ -1878,14 +1878,14 @@ namespace Vanara.PInvoke /// public class SafeLsaMemoryHandle : HANDLE { - /// Initializes a new instance of the class and assigns an existing handle. + /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// public SafeLsaMemoryHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. private SafeLsaMemoryHandle() : base() { } /// diff --git a/PInvoke/Security/AdvApi32/Sddl.cs b/PInvoke/Security/AdvApi32/Sddl.cs index 02970d68..22910d87 100644 --- a/PInvoke/Security/AdvApi32/Sddl.cs +++ b/PInvoke/Security/AdvApi32/Sddl.cs @@ -35,7 +35,6 @@ namespace Vanara.PInvoke /// the output string. /// /// - /// /// /// /// A pointer to a variable that receives a pointer to a null-terminated security descriptor string. For a description of the diff --git a/PInvoke/Security/AdvApi32/SecurityBaseApi.SID.cs b/PInvoke/Security/AdvApi32/SecurityBaseApi.SID.cs index a77a620f..a80b0565 100644 --- a/PInvoke/Security/AdvApi32/SecurityBaseApi.SID.cs +++ b/PInvoke/Security/AdvApi32/SecurityBaseApi.SID.cs @@ -192,7 +192,7 @@ namespace Vanara.PInvoke /// Initializes a new instance of the class. private SafeAllocatedSID() : base() { } - /// Performs an implicit conversion from to . + /// Performs an implicit conversion from to . /// The safe handle instance. /// The result of the conversion. public static implicit operator PSID(SafeAllocatedSID h) => h.handle; diff --git a/PInvoke/Security/AdvApi32/WinNT.RegSvc.cs b/PInvoke/Security/AdvApi32/WinNT.RegSvc.cs index 447c318f..64a776e7 100644 --- a/PInvoke/Security/AdvApi32/WinNT.RegSvc.cs +++ b/PInvoke/Security/AdvApi32/WinNT.RegSvc.cs @@ -137,8 +137,7 @@ namespace Vanara.PInvoke } /// - /// Used by the function. + /// Used by the function. /// public enum ServiceErrorControlType : uint { @@ -165,8 +164,7 @@ namespace Vanara.PInvoke } /// - /// Used by the function. + /// Used by the function. /// public enum ServiceStartType : uint { @@ -190,8 +188,7 @@ namespace Vanara.PInvoke } /// - /// Used by the function. + /// Used by the function. /// [Flags] public enum ServiceTypes : uint diff --git a/PInvoke/Security/AdvApi32/WinNT.cs b/PInvoke/Security/AdvApi32/WinNT.cs index 6633a258..5dd5b477 100644 --- a/PInvoke/Security/AdvApi32/WinNT.cs +++ b/PInvoke/Security/AdvApi32/WinNT.cs @@ -22,7 +22,7 @@ namespace Vanara.PInvoke ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2 } - /// Used by the function. + /// Used by the function. [PInvokeData("winnt.h")] public enum ACL_INFORMATION_CLASS : uint { diff --git a/PInvoke/Security/Authz/Authz.cs b/PInvoke/Security/Authz/Authz.cs index 940ac6d6..8ea45f02 100644 --- a/PInvoke/Security/Authz/Authz.cs +++ b/PInvoke/Security/Authz/Authz.cs @@ -327,9 +327,7 @@ namespace Vanara.PInvoke } /// - /// Flags used in the method. + /// Flags used in the method. /// [PInvokeData("authz.h")] [Flags] diff --git a/PInvoke/Shared/Handles.cs b/PInvoke/Shared/Handles.cs index 1da2e51f..d897c02d 100644 --- a/PInvoke/Shared/Handles.cs +++ b/PInvoke/Shared/Handles.cs @@ -1828,7 +1828,7 @@ namespace Vanara.PInvoke /// Base class for all native handles. /// - /// + /// /// public class HANDLE : SafeHandleZeroOrMinusOneIsInvalid, IEquatable, IHandle { @@ -1842,7 +1842,7 @@ namespace Vanara.PInvoke /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// - protected HANDLE(IntPtr ptr, bool ownsHandle = true) : base(ownsHandle) => SetHandle(ptr); + protected HANDLE(IntPtr preexistingHandle, bool ownsHandle = true) : base(ownsHandle) => SetHandle(preexistingHandle); /// Gets a value indicating whether this instance is null. /// true if this instance is null; otherwise, false. diff --git a/PInvoke/Shared/InteropServices/SafeNativeArray.cs b/PInvoke/Shared/InteropServices/SafeNativeArray.cs index 45a1eece..11ce338f 100644 --- a/PInvoke/Shared/InteropServices/SafeNativeArray.cs +++ b/PInvoke/Shared/InteropServices/SafeNativeArray.cs @@ -14,18 +14,16 @@ namespace Vanara.InteropServices { private static readonly int ElemSize = Marshal.SizeOf(typeof(TElem)); - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. public SafeNativeArray() : base(0) { } /// - /// Initializes a new instance of the class from a copy of a managed TElem array. + /// Initializes a new instance of the class from a copy of a managed TElem array. /// /// The array of bytes to copy. - /// Size of the get elem. public SafeNativeArray(TElem[] array) : base(IntPtr.Zero, 0, true) => Elements = array; - /// Initializes a new instance of the class. - /// Size of the byte. + /// Initializes a new instance of the class. /// The element count. This value can be 0. public SafeNativeArray(int elementCount) : base(GetRequiredSize(elementCount)) => Zero(); @@ -35,7 +33,7 @@ namespace Vanara.InteropServices /// if set to true [owns handle]. public SafeNativeArray(IntPtr ptr, int size, bool ownsHandle) : base(ptr, size, ownsHandle) { } - /// Gets the number of elements contained in the . + /// Gets the number of elements contained in the . public int Count => IsInvalid ? 0 : BytesToCount(Size); public bool IsReadOnly => false; diff --git a/PInvoke/Shared/ResourceId.cs b/PInvoke/Shared/ResourceId.cs index 0ee8cb03..0de765d2 100644 --- a/PInvoke/Shared/ResourceId.cs +++ b/PInvoke/Shared/ResourceId.cs @@ -198,6 +198,8 @@ namespace Vanara.PInvoke /// Initializes a new instance of the class. /// Name of the resource. + /// The character set. + /// resName public SafeResourceId(string resName, CharSet charSet = CharSet.Auto) { if (string.IsNullOrEmpty(resName)) throw new ArgumentNullException(nameof(resName)); diff --git a/PInvoke/Shared/WinUser/SystemColorIndex.cs b/PInvoke/Shared/WinUser/SystemColorIndex.cs index 68df6dcf..6c356469 100644 --- a/PInvoke/Shared/WinUser/SystemColorIndex.cs +++ b/PInvoke/Shared/WinUser/SystemColorIndex.cs @@ -1,6 +1,6 @@ namespace Vanara.PInvoke { - /// Color index used to get a system color from . + /// Color index used to get a system color from GetSysColor. [PInvokeData("WinUser.h", MSDNShortId = "ms724371")] public enum SystemColorIndex { diff --git a/PInvoke/Shell32/ShObjIdl.IExtractImage.cs b/PInvoke/Shell32/ShObjIdl.IExtractImage.cs index d7362c1d..b88688f8 100644 --- a/PInvoke/Shell32/ShObjIdl.IExtractImage.cs +++ b/PInvoke/Shell32/ShObjIdl.IExtractImage.cs @@ -99,7 +99,7 @@ namespace Vanara.PInvoke HRESULT GetLocation([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPathBuffer, uint cchMax, [Optional] IntPtr pdwPriority, ref SIZE prgSize, uint dwRecClrDepth, ref IEIFLAG pdwFlags); /// Requests an image from an object, such as an item in a Shell folder. - /// The HBITMAP of the image. + /// The HBITMAP of the image. HBITMAP Extract(); } } diff --git a/PInvoke/Shell32/ShellApi.cs b/PInvoke/Shell32/ShellApi.cs index b0e944a4..4edf5712 100644 --- a/PInvoke/Shell32/ShellApi.cs +++ b/PInvoke/Shell32/ShellApi.cs @@ -253,16 +253,22 @@ namespace Vanara.PInvoke /// NIIF_LARGE_ICON = 0x00000020, - /// Windows 7 and later. Do not display the balloon notification if the current user is in "quiet time", which is the - /// first hour after a new user logs into his or her account for the first time. During this time, most notifications should not - /// be sent or shown. This lets a user become accustomed to a new computer system without those distractions. Quiet time also - /// occurs for each user after an operating system upgrade or clean installation. A notification sent with this flag during quiet - /// time is not queued; it is simply dismissed unshown. The application can resend the notification later if it is still valid at - /// that time. During quiet - /// time, certain notifications should still be sent because they are expected by the user as feedback in response to a user - /// action, for instance when he or she plugs in a USB device or prints a document. If the current user is not in - /// quiet time, this flag has no effect. + /// + /// Windows 7 and later. Do not display the balloon notification if the current user is in "quiet time", which is the first hour + /// after a new user logs into his or her account for the first time. During this time, most notifications should not be sent or + /// shown. This lets a user become accustomed to a new computer system without those distractions. Quiet time also occurs for + /// each user after an operating system upgrade or clean installation. A notification sent with this flag during quiet time is + /// not queued; it is simply dismissed unshown. The application can resend the notification later if it is still valid at that time. + /// + /// Because an application cannot predict when it might encounter quiet time, we recommended that this flag always be set on all + /// appropriate notifications by any application that means to honor quiet time.> + /// + /// + /// During quiet time, certain notifications should still be sent because they are expected by the user as feedback in response + /// to a user action, for instance when he or she plugs in a USB device or prints a document. + /// + /// If the current user is not in quiet time, this flag has no effect. + /// NIIF_RESPECT_QUIET_TIME = 0x00000080 } @@ -3443,7 +3449,7 @@ namespace Vanara.PInvoke /// /// Adds an icon to a balloon ToolTip. It is placed to the left of the title. If the szTitleInfo member is zero-length, the icon - /// is not shown. See RMUtils.WinAPI.Structs.BalloonIconStyle for more information. + /// is not shown. /// public NIIF dwInfoFlags; diff --git a/PInvoke/Shell32/ShlObj.cs b/PInvoke/Shell32/ShlObj.cs index 53fb794b..e30b4bb6 100644 --- a/PInvoke/Shell32/ShlObj.cs +++ b/PInvoke/Shell32/ShlObj.cs @@ -197,13 +197,13 @@ namespace Vanara.PInvoke [Flags] public enum GPFIDL_FLAGS { - /// Win32 file names, servers, and root drives are included. + /// Win32 file names, servers, and root drives are included. GPFIDL_DEFAULT = 0x0000, - /// Uses short file names. + /// Uses short file names. GPFIDL_ALTNAME = 0x0001, - /// Include UNC printer names items. + /// Include UNC printer names items. GPFIDL_UNCPRINTER = 0x0002, } @@ -6426,8 +6426,8 @@ namespace Vanara.PInvoke /// The count of items in member aKeys. This value can be zero. If the value is zero, the extensions are loaded based /// on the object that supports interface IQueryAssociations as specified by member punkAssociationInfo. If the value is /// non-NULL, the extensions are loaded based only on member aKeys and not member punkAssociationInfo. - // Note The maximum number of keys is 16. Callers must enforce this limit as the API does not. Failing to do so can result in - // memory corruption. + /// Note The maximum number of keys is 16. Callers must enforce this limit as the API does not. Failing to do so can result in + /// memory corruption. /// public uint cKeys; diff --git a/PInvoke/ShlwApi/ShlwApi.IQueryAssociations.cs b/PInvoke/ShlwApi/ShlwApi.IQueryAssociations.cs index 315ee026..14b26405 100644 --- a/PInvoke/ShlwApi/ShlwApi.IQueryAssociations.cs +++ b/PInvoke/ShlwApi/ShlwApi.IQueryAssociations.cs @@ -413,7 +413,7 @@ namespace Vanara.PInvoke /// to a Shell verb such as open. Set this parameter to NULL if it is not used. /// /// A pointer to the key's HKEY value. - void GetKey(ASSOCF flags, ASSOCKEY key, [Optional, MarshalAs(UnmanagedType.LPWStr)] string pszExtra, out HKEY phkeyOut); + void GetKey(ASSOCF flags, ASSOCKEY data, [Optional, MarshalAs(UnmanagedType.LPWStr)] string pszExtra, out HKEY phkeyOut); /// Searches for and retrieves file or protocol association-related binary data from the registry. /// The ASSOCF value that can be used to control the search. diff --git a/PInvoke/ShlwApi/ShlwApi.PathXX.cs b/PInvoke/ShlwApi/ShlwApi.PathXX.cs index 9ee0c95b..52b5e9e0 100644 --- a/PInvoke/ShlwApi/ShlwApi.PathXX.cs +++ b/PInvoke/ShlwApi/ShlwApi.PathXX.cs @@ -515,7 +515,7 @@ namespace Vanara.PInvoke [DllImport(Lib.Shlwapi, SetLastError = false, CharSet = CharSet.Auto)] [PInvokeData("shlwapi.h", MSDNShortId = "d9281eb2-39b7-444f-85b7-1e1e76c38ae2")] [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool PathFindOnPath(StringBuilder pszFile, [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPTStr)] string[] ppszOtherDirs); + public static extern bool PathFindOnPath(StringBuilder pszPath, [In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPTStr)] string[] ppszOtherDirs); /// /// Determines whether a given file name has one of a list of suffixes. diff --git a/PInvoke/ShlwApi/ShlwApi.StrXX.cs b/PInvoke/ShlwApi/ShlwApi.StrXX.cs index 14e8ec67..7172b18f 100644 --- a/PInvoke/ShlwApi/ShlwApi.StrXX.cs +++ b/PInvoke/ShlwApi/ShlwApi.StrXX.cs @@ -998,7 +998,7 @@ namespace Vanara.PInvoke // pszBuf, UINT cchBuf ); [DllImport(Lib.Shlwapi, SetLastError = false, ExactSpelling = true)] [PInvokeData("shlwapi.h", MSDNShortId = "244f93cb-0976-4a31-958c-ae0ed81c1dcf")] - public static extern StrPtrUni StrFormatByteSizeW(long qdw, StringBuilder pszBuf, uint cchBuf); + public static extern StrPtrUni StrFormatByteSizeW(long dw, StringBuilder pszBuf, uint cchBuf); /// /// Converts a numeric value into a string that represents the number expressed as a size value in kilobytes. @@ -1523,8 +1523,6 @@ namespace Vanara.PInvoke /// A pointer to the null-terminated string to be converted. A valid string representing a decimal value contains only the characters /// 0-9 and must have the following form to be parsed successfully. /// - /// - /// /// The optional sign can be the character '-' or '+'; if omitted, the sign is assumed to be positive. /// /// diff --git a/PInvoke/ShlwApi/ShlwApi.UrlXX.cs b/PInvoke/ShlwApi/ShlwApi.UrlXX.cs index 882eb6a6..8e8ca50e 100644 --- a/PInvoke/ShlwApi/ShlwApi.UrlXX.cs +++ b/PInvoke/ShlwApi/ShlwApi.UrlXX.cs @@ -138,9 +138,11 @@ namespace Vanara.PInvoke /// URL_UNESCAPE = 0x10000000, - /// Replace unsafe characters with their escape sequences. Unsafe characters are those characters that may be altered - /// during transport across the Internet, and include the (<, >, ", #, {, }, |, , ^, [, ], and ') characters. This flag applies - /// to all URLs, including opaque URLs. + /// + /// Replace unsafe characters with their escape sequences. Unsafe characters are those characters that may be altered + /// during transport across the Internet, and include the (<, >, ", #, {, }, |, , ^, [, ], and ') characters. This flag applies + /// to all URLs, including opaque URLs. + /// URL_ESCAPE_UNSAFE = 0x20000000, /// diff --git a/PInvoke/ShlwApi/Shlwapi.cs b/PInvoke/ShlwApi/Shlwapi.cs index 5215adff..ebe39bb9 100644 --- a/PInvoke/ShlwApi/Shlwapi.cs +++ b/PInvoke/ShlwApi/Shlwapi.cs @@ -347,9 +347,11 @@ namespace Vanara.PInvoke /// The program is running as a Terminal Server client. Equivalent to GetSystemMetrics(SM_REMOTESESSION). OS_TERMINALCLIENT = 14, - /// The program is running on Windows 2000 Terminal Server in the Remote Administration mode or Windows Server 2003 (or + /// + /// The program is running on Windows 2000 Terminal Server in the Remote Administration mode or Windows Server 2003 (or /// one of its successors) in the Remote Desktop for Administration mode (these are the default installation modes). This is - /// equivalent to VER_SUITE_TERMINAL && VER_SUITE_SINGLEUSERTS. + /// equivalent to VER_SUITE_TERMINAL && VER_SUITE_SINGLEUSERTS. + /// OS_TERMINALREMOTEADMIN = 15, /// Always returns FALSE. @@ -365,15 +367,15 @@ namespace Vanara.PInvoke OS_HOME = 19, /// The program is running on Windows NT Workstation or Windows 2000 (or one of its successors) Professional. Equivalent - /// to VER_PLATFORM_WIN32_NT && VER_NT_WORKSTATION. + /// to VER_PLATFORM_WIN32_NT && VER_NT_WORKSTATION. OS_PROFESSIONAL = 20, /// The program is running on Windows Datacenter Server or Windows Server Datacenter Edition, any version. Equivalent to - /// (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) && VER_SUITE_DATACENTER. + /// (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) && VER_SUITE_DATACENTER. OS_DATACENTER = 21, /// The program is running on Windows Advanced Server or Windows Server Enterprise Edition, any version. Equivalent to - /// (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) && VER_SUITE_ENTERPRISE && !VER_SUITE_DATACENTER. + /// (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) && VER_SUITE_ENTERPRISE && !VER_SUITE_DATACENTER. OS_ADVSERVER = 22, /// @@ -383,11 +385,11 @@ namespace Vanara.PInvoke OS_SERVER = 23, /// The program is running on Windows 2000 Terminal Server in Application Server mode, or on Windows Server 2003 (or one - /// of its successors) in Terminal Server mode. This is equivalent to VER_SUITE_TERMINAL && VER_SUITE_SINGLEUSERTS. + /// of its successors) in Terminal Server mode. This is equivalent to VER_SUITE_TERMINAL && VER_SUITE_SINGLEUSERTS. OS_TERMINALSERVER = 24, /// The program is running on Windows XP (or one of its successors), Home Edition or Professional. This is equivalent to - /// VER_SUITE_SINGLEUSERTS && !VER_SUITE_TERMINAL. + /// VER_SUITE_SINGLEUSERTS && !VER_SUITE_TERMINAL. OS_PERSONALTERMINALSERVER = 25, /// Fast user switching is enabled. diff --git a/PInvoke/TaskSchd/MSTask.cs b/PInvoke/TaskSchd/MSTask.cs index b00e7c76..90a7c7ff 100644 --- a/PInvoke/TaskSchd/MSTask.cs +++ b/PInvoke/TaskSchd/MSTask.cs @@ -819,16 +819,13 @@ namespace Vanara.PInvoke /// Retrieves the next specified number of tasks in the enumeration sequence. /// If there are fewer than the requested number of tasks left in the sequence, all the remaining elements are retrieved. /// - /// - /// The number of tasks to retrieve. - /// + /// The instance on which to act. + /// The number of tasks to retrieve. /// /// An array of strings containing the file names of the tasks returned from the enumeration sequence. These file names are taken /// from the Scheduled Tasks folder and have the ".job" extension. /// - /// - /// The number of tasks returned in rgpwszNames. - /// + /// The number of tasks returned in rgpwszNames. /// /// Returns one of the following values. /// diff --git a/PInvoke/User32.Gdi/WinUser.ComboBox.cs b/PInvoke/User32.Gdi/WinUser.ComboBox.cs index 05524f9f..3ff42b6a 100644 --- a/PInvoke/User32.Gdi/WinUser.ComboBox.cs +++ b/PInvoke/User32.Gdi/WinUser.ComboBox.cs @@ -271,7 +271,7 @@ namespace Vanara.PInvoke /// /// lParam /// - /// A pointer to an structure containing information about the notification code and the item that was inserted. + /// A pointer to an NMCOMBOBOXEX structure containing information about the notification code and the item that was inserted. /// /// /// @@ -284,7 +284,7 @@ namespace Vanara.PInvoke /// /// lParam /// - /// A pointer to an structure that contains information about the notification code and the deleted item. + /// A pointer to an NMCOMBOBOXEX structure that contains information about the notification code and the deleted item. /// /// /// @@ -312,7 +312,7 @@ namespace Vanara.PInvoke /// /// lParam /// - /// A pointer to an structure that contains information about how the user concluded the edit operation. + /// A pointer to an NMCBEENDEDIT structure that contains information about how the user concluded the edit operation. /// /// /// @@ -326,7 +326,7 @@ namespace Vanara.PInvoke /// /// lParam /// - /// A pointer to an structure that contains information about how the user concluded the edit operation. + /// A pointer to an NMCBEENDEDIT structure that contains information about how the user concluded the edit operation. /// /// /// @@ -339,7 +339,7 @@ namespace Vanara.PInvoke /// /// lParam /// - /// A pointer to an structure that contains information about the notification code. + /// A pointer to an NMCOMBOBOXEX structure that contains information about the notification code. /// /// /// @@ -353,7 +353,7 @@ namespace Vanara.PInvoke /// /// lParam /// - /// A pointer to a structure that contains information about the notification code. + /// A pointer to a NMCBEDRAGBEGIN structure that contains information about the notification code. /// /// /// diff --git a/PInvoke/User32.Gdi/WinUser.Window.cs b/PInvoke/User32.Gdi/WinUser.Window.cs index 7f84e4c1..7d216837 100644 --- a/PInvoke/User32.Gdi/WinUser.Window.cs +++ b/PInvoke/User32.Gdi/WinUser.Window.cs @@ -715,7 +715,7 @@ namespace Vanara.PInvoke TPM_WORKAREA = 0x10000, } - /// Flags for + /// Flags for [PInvokeData("winuser.h", MSDNShortId = "updatelayeredwindow")] [Flags] public enum UpdateLayeredWindowFlags @@ -1622,7 +1622,7 @@ namespace Vanara.PInvoke // hwnd, POINT pt, UINT flags ); [DllImport(Lib.User32, SetLastError = false, ExactSpelling = true)] [PInvokeData("winuser.h", MSDNShortId = "childwindowfrompointex")] - public static extern HWND ChildWindowFromPointEx(HWND hwndParent, Point pt, ChildWindowSkipOptions uFlags); + public static extern HWND ChildWindowFromPointEx(HWND hwnd, Point pt, ChildWindowSkipOptions flags); /// /// Minimizes (but does not destroy) the specified window. @@ -2841,7 +2841,7 @@ namespace Vanara.PInvoke /// // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-getnextwindow void GetNextWindow( hWnd, wCmd ); [PInvokeData("winuser.h", MSDNShortId = "getnextwindow")] - public static void GetNextWindow(HWND hWnd, GetWindowCmd uCmd) => GetWindow(hWnd, uCmd); + public static void GetNextWindow(HWND hWnd, GetWindowCmd wCmd) => GetWindow(hWnd, wCmd); /// /// Retrieves a handle to the specified window's parent or owner. @@ -3343,8 +3343,8 @@ namespace Vanara.PInvoke /// /// Type: LPWSTR /// The buffer that is to receive the text. + /// If the string is as long or longer than the buffer, the string is truncated and terminated with a null character. /// - /// /// /// Type: int /// @@ -3365,8 +3365,8 @@ namespace Vanara.PInvoke /// 2003. If you do not have a header file and import library for this function, you can call the function using LoadLibrary and GetProcAddress. /// /// - // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-internalgetwindowtext int InternalGetWindowText( HWND - // hWnd, LPWSTR pString, int cchMaxCount ); + // https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-internalgetwindowtext + // int InternalGetWindowText( HWND hWnd, LPWSTR pString, int cchMaxCount ); [DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)] [PInvokeData("winuser.h", MSDNShortId = "internalgetwindowtext")] public static extern int InternalGetWindowText(HWND hWnd, [MarshalAs(UnmanagedType.LPWStr)] StringBuilder pString, int cchMaxCount); @@ -4318,8 +4318,8 @@ namespace Vanara.PInvoke /// The display affinity setting. This setting specifies where the window's contents are can be displayed. Set this value to /// WDA_MONITOR to display the window's contents only on a monitor. /// + /// Set this value to WDA_NONE to remove the monitor-only affinity. /// - /// /// /// Type: Type: BOOL /// diff --git a/PInvoke/User32/WinUser.Clipboard.cs b/PInvoke/User32/WinUser.Clipboard.cs index ea9e77d2..d691354b 100644 --- a/PInvoke/User32/WinUser.Clipboard.cs +++ b/PInvoke/User32/WinUser.Clipboard.cs @@ -212,7 +212,7 @@ namespace Vanara.PInvoke WM_VSCROLLCLIPBOARD = 0x030A, } - /// The clipboard formats defined by the system are called standard clipboard formats. + /// The clipboard formats defined by the system are called standard clipboard formats. // https://docs.microsoft.com/en-us/windows/desktop/dataxchg/standard-clipboard-formats [PInvokeData("Winuser.h", MSDNShortId = "f0af4e61-7ef1-4263-b2c5-e4114515124f")] public enum StandardClipboardFormat : uint diff --git a/PInvoke/User32/WinUser.Hook.cs b/PInvoke/User32/WinUser.Hook.cs index 3a5c6ec1..8a4451d2 100644 --- a/PInvoke/User32/WinUser.Hook.cs +++ b/PInvoke/User32/WinUser.Hook.cs @@ -494,7 +494,7 @@ namespace Vanara.PInvoke // HOOKPROC lpfn, HINSTANCE hmod, DWORD dwThreadId ); [DllImport(Lib.User32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("winuser.h", MSDNShortId = "setwindowshookex")] - public static extern SafeHHOOK SetWindowsHookEx(HookType idHook, HookProc lpfn, HINSTANCE hMod, int dwThreadId); + public static extern SafeHHOOK SetWindowsHookEx(HookType idHook, HookProc lpfn, HINSTANCE hmod, int dwThreadId); /// /// Removes a hook procedure installed in a hook chain by the SetWindowsHookEx function. diff --git a/PInvoke/UxTheme/UXTHEME_BufferedPaint.cs b/PInvoke/UxTheme/UXTHEME_BufferedPaint.cs index 68762013..4ec76c9d 100644 --- a/PInvoke/UxTheme/UXTHEME_BufferedPaint.cs +++ b/PInvoke/UxTheme/UXTHEME_BufferedPaint.cs @@ -613,6 +613,7 @@ namespace Vanara.PInvoke /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. + /// The value to pass when closing this handle. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// @@ -637,6 +638,7 @@ namespace Vanara.PInvoke /// Initializes a new instance of the class and assigns an existing handle. /// An object that represents the pre-existing handle to use. + /// The value to pass when closing this handle. /// /// to reliably release the handle during the finalization phase; otherwise, (not recommended). /// diff --git a/PInvoke/WinINet/WinINet.cs b/PInvoke/WinINet/WinINet.cs index 035a7947..beea1be1 100644 --- a/PInvoke/WinINet/WinINet.cs +++ b/PInvoke/WinINet/WinINet.cs @@ -1773,7 +1773,7 @@ namespace Vanara.PInvoke public static implicit operator SafeInternetConnectHandle(IntPtr hInternet) => new SafeInternetConnectHandle(hInternet); } - /// Provides a for that is disposed using . + /// Provides a that is disposed using . public class SafeInternetHandle : HANDLE { /// Initializes a new instance of the class and assigns an existing handle. diff --git a/System/BITS/BackgroundCopyJobCollection.cs b/System/BITS/BackgroundCopyJobCollection.cs index 1f92ced1..beacb310 100644 --- a/System/BITS/BackgroundCopyJobCollection.cs +++ b/System/BITS/BackgroundCopyJobCollection.cs @@ -101,7 +101,7 @@ namespace Vanara.IO return new Enumerator(ienum); } - /// Removes the first occurrence of a specific object from the . The object to + /// Removes the first occurrence of a specific object from the . The object to /// remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . item diff --git a/System/BITS/BackgroundCopyJobCredentials.cs b/System/BITS/BackgroundCopyJobCredentials.cs index 734e2eb2..f3379678 100644 --- a/System/BITS/BackgroundCopyJobCredentials.cs +++ b/System/BITS/BackgroundCopyJobCredentials.cs @@ -7,7 +7,7 @@ using static Vanara.PInvoke.BITS; namespace Vanara.IO { /// Represents a single BITS job credential. - /// + /// public class BackgroundCopyJobCredential : IComparable { /// Initializes a new instance of the class. @@ -54,7 +54,7 @@ namespace Vanara.IO /// The list of credentials for a job. /// - /// + /// public class BackgroundCopyJobCredentials : IDisposable, ICollection { private Dictionary dict; diff --git a/System/Network/NetworkListManager.cs b/System/Network/NetworkListManager.cs index 2e05b693..a57546fa 100644 --- a/System/Network/NetworkListManager.cs +++ b/System/Network/NetworkListManager.cs @@ -27,7 +27,8 @@ namespace Vanara.Network /// Gets the length of the list. int Length { get; } - /// Gets the with the specified identifier. + /// Gets the with the specified identifier. + /// The found item type. /// The identifier. /// The item found by the identifier. T this[TLookup id] { get; } diff --git a/System/Path.cs b/System/Path.cs index 530482a5..74499fe8 100644 --- a/System/Path.cs +++ b/System/Path.cs @@ -39,7 +39,7 @@ namespace Vanara.IO /// /// The path string. This value should not be . /// The path string with the appended backslash. - public static string AddBackslash(string path) => SBAllocCallRet((s, sz) => PathCchAddBackslash(s, sz), path, err: ThrowIfNotOkOrFalse); + public static string AddBackslash(string pszPath) => SBAllocCallRet((s, sz) => PathCchAddBackslash(s, sz), pszPath, err: ThrowIfNotOkOrFalse); /// /// Adds a file name extension to a path string. diff --git a/WIndows.Forms/DesktopWindowManager.cs b/WIndows.Forms/DesktopWindowManager.cs index bb5f5eb9..1d0aae57 100644 --- a/WIndows.Forms/DesktopWindowManager.cs +++ b/WIndows.Forms/DesktopWindowManager.cs @@ -290,8 +290,6 @@ namespace Vanara.Windows.Forms /// Gets the live client thumbnail. /// The window. - /// if set to true [visible]. - /// /// public static LiveThumbnail GetLiveClientThumbnail(this IWin32Window window) => new LiveThumbnail(window); diff --git a/WIndows.Forms/Dialogs/ShellProgressDialog.cs b/WIndows.Forms/Dialogs/ShellProgressDialog.cs index 5ef150e8..f967e581 100644 --- a/WIndows.Forms/Dialogs/ShellProgressDialog.cs +++ b/WIndows.Forms/Dialogs/ShellProgressDialog.cs @@ -21,7 +21,7 @@ namespace Vanara.Windows.Forms /// /// Do not display a progress bar. Typically, an application can quantitatively determine how much of the operation remains and - /// periodically pass that value to . The progress dialog box uses this information to + /// periodically pass that value to UpdateProgress. The progress dialog box uses this information to /// update its progress bar. This flag is typically set when the calling application must wait for an operation to finish, but does /// not have any quantitative information it can use to update the dialog box. /// @@ -70,7 +70,7 @@ namespace Vanara.Windows.Forms iDlg = new IProgressDialog(); } - /// Gets or sets a value indicating whether to automatically estimate the remaining time and display it. + /// Gets or sets a value indicating whether to automatically estimate the remaining time and display it. [DefaultValue(false), Category("Behavior"), Description("Automatically estimate the remaining time and display it.")] public bool AutoTimeEstimation { get => flags[PROGDLG.PROGDLG_AUTOTIME]; set => flags[PROGDLG.PROGDLG_AUTOTIME] = value; } @@ -203,10 +203,10 @@ namespace Vanara.Windows.Forms /// Starts the progress dialog box. /// The progress dialog box's parent window. This value can be . - public virtual void Start(IWin32Window owner) + public virtual void Start(IWin32Window hwndParent) { closed = false; - iDlg.StartProgressDialog(owner?.Handle ?? IntPtr.Zero, dwFlags: flags); + iDlg.StartProgressDialog(hwndParent?.Handle ?? IntPtr.Zero, dwFlags: flags); iDlg.Timer(PDTIMER.PDTIMER_RESET); } diff --git a/WIndows.Forms/Extensions/IconExtension.cs b/WIndows.Forms/Extensions/IconExtension.cs index 10a2f3d6..4ee45301 100644 --- a/WIndows.Forms/Extensions/IconExtension.cs +++ b/WIndows.Forms/Extensions/IconExtension.cs @@ -38,7 +38,7 @@ using static Vanara.PInvoke.User32_Gdi; namespace Vanara.Extensions { - /// Used to determine the size of the icon returned by . + /// Used to determine the size of the icon returned by various shell methods. public enum IconSize { /// @@ -108,11 +108,11 @@ namespace Vanara.Extensions /// The ITEMIDLIST pointer from which to retrieve the icon. /// Size of the icon. /// Icon of the specified size, or null if no icon is associated with this ITEMIDLIST. - public static Icon GetIcon(this PIDL pidl, IconSize iconType = IconSize.Large) + public static Icon GetIcon(this PIDL pidl, IconSize iconSize = IconSize.Large) { if (pidl.IsInvalid) return null; var shfi = new SHFILEINFO(); - var ret = SHGetFileInfo(pidl, 0, ref shfi, SHFILEINFO.Size, SHGFI.SHGFI_ICON | SHGFI.SHGFI_PIDL | (SHGFI)iconType); + var ret = SHGetFileInfo(pidl, 0, ref shfi, SHFILEINFO.Size, SHGFI.SHGFI_ICON | SHGFI.SHGFI_PIDL | (SHGFI)iconSize); return ret == IntPtr.Zero ? null : new SafeHICON((IntPtr)shfi.hIcon).ToIcon(); } @@ -134,7 +134,7 @@ namespace Vanara.Extensions /// Gets the Shell icon for the given file name or extension. /// The file name or extension . - /// Flags to specify the type of the icon to retrieve. This uses the method and can only retrieve small or large icons. + /// Flags to specify the type of the icon to retrieve. This uses the method and can only retrieve small or large icons. /// An instance if found; otherwise . public static Icon GetFileIcon(string fileNameOrExtension, IconSize iconType = IconSize.Large) { diff --git a/Windows.Shell/ShellFileOperations.cs b/Windows.Shell/ShellFileOperations.cs index 0ce9437a..2c7287dc 100644 --- a/Windows.Shell/ShellFileOperations.cs +++ b/Windows.Shell/ShellFileOperations.cs @@ -39,157 +39,42 @@ namespace Vanara.Windows.Shell } /// Performs caller-implemented actions after the last operation performed by the call to IFileOperation is complete. - /// - /// The return value of the final operation. Note that this is not the HRESULT returned by one of the IFileOperation methods, which simply queue the - /// operations. Instead, this is the result of the actual operation, such as copy, delete, or move. - /// public event EventHandler FinishOperations; /// Performs caller-implemented actions after the copy process for each item is complete. - /// - /// bitwise value that contains flags that were used during the copy operation. Some values can be set or changed during the copy operation. See - /// TRANSFER_SOURCE_FLAGS for flag descriptions. - /// - /// Pointer to an IShellItem that specifies the source item. - /// Pointer to an IShellItem that specifies the destination folder to which the item was copied. - /// - /// Pointer to the new name that was given to the item after it was copied. This is a null-terminated Unicode string. Note that this might not be the - /// name that you asked for, given collisions and other naming rules. - /// - /// - /// The return value of the copy operation. Note that this is not the HRESULT returned by CopyItem, which simply queues the copy operation. Instead, this - /// is the result of the actual copy. - /// - /// Pointer to an IShellItem that represents the new copy of the item. public event EventHandler PostCopyItem; /// Performs caller-implemented actions after the delete process for each item is complete. - /// - /// bitwise value that contains flags that were used during the delete operation. Some values can be set or changed during the delete operation. See - /// TRANSFER_SOURCE_FLAGS for flag descriptions. - /// - /// Pointer to an IShellItem that specifies the item that was deleted. - /// - /// The return value of the delete operation. Note that this is not the HRESULT returned by DeleteItem, which simply queues the delete operation. - /// Instead, this is the result of the actual deletion. - /// - /// - /// A pointer to an IShellItem that specifies the deleted item, now in the Recycle Bin. If the item was fully deleted, this value is NULL. - /// public event EventHandler PostDeleteItem; /// Performs caller-implemented actions after the move process for each item is complete. - /// - /// bitwise value that contains flags that were used during the move operation. Some values can be set or changed during the move operation. See - /// TRANSFER_SOURCE_FLAGS for flag descriptions. - /// - /// Pointer to an IShellItem that specifies the source item. - /// Pointer to an IShellItem that specifies the destination folder that contains the moved item. - /// - /// Pointer to the name that was given to the item after it was moved. This is a null-terminated Unicode string. Note that this might not be the name - /// that you asked for, given collisions and other naming rules. - /// - /// - /// The return value of the move operation. Note that this is not the HRESULT returned by MoveItem, which simply queues the move operation. Instead, this - /// is the result of the actual move. - /// - /// Pointer to an IShellItem that represents the moved item in its new location. public event EventHandler PostMoveItem; /// Performs caller-implemented actions after the new item is created. - /// - /// bitwise value that contains flags that were used during the creation operation. Some values can be set or changed during the creation operation. See - /// TRANSFER_SOURCE_FLAGS for flag descriptions. - /// - /// Pointer to an IShellItem that specifies the destination folder to which the new item was added. - /// Pointer to the file name of the new item, for instance Newfile.txt. This is a null-terminated, Unicode string. - /// - /// Pointer to the name of the template file (for example Excel9.xls) that the new item is based on, stored in one of the following locations: - /// - /// - /// CSIDL_COMMON_TEMPLATES. The default path for this folder is %ALLUSERSPROFILE%\Templates. - /// - /// - /// CSIDL_TEMPLATES. The default path for this folder is %USERPROFILE%\Templates. - /// - /// - /// %SystemRoot%\shellnew - /// - /// - /// - /// This is a null-terminated, Unicode string used to specify an existing file of the same type as the new file, containing the minimal content that an - /// application wants to include in any new file. - /// - /// This parameter is normally NULL to specify a new, blank file. - /// - /// The file attributes applied to the new item. One or more of the values found at GetFileAttributes. - /// - /// The return value of the creation operation. Note that this is not the HRESULT returned by NewItem, which simply queues the creation operation. - /// Instead, this is the result of the actual creation. - /// - /// Pointer to an IShellItem that represents the new item. public event EventHandler PostNewItem; /// Performs caller-implemented actions after the rename process for each item is complete. - /// - /// bitwise value that contains flags that were used during the rename operation. Some values can be set or changed during the rename operation. See - /// TRANSFER_SOURCE_FLAGS for flag descriptions. - /// - /// Pointer to an IShellItem that specifies the item before it was renamed. - /// - /// Pointer to the new display name of the item. This is a null-terminated, Unicode string. Note that this might not be the name that you asked for, - /// given collisions and other naming rules. - /// - /// - /// The return value of the rename operation. Note that this is not the HRESULT returned by RenameItem, which simply queues the rename operation. - /// Instead, this is the result of the actual rename operation. - /// - /// Pointer to an IShellItem that represents the item with its new name. public event EventHandler PostRenameItem; /// Performs caller-implemented actions before the copy process for each item begins. - /// bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions. - /// Pointer to an IShellItem that specifies the source item. - /// Pointer to an IShellItem that specifies the destination folder to contain the copy of the item. - /// - /// Pointer to a new name for the item after it has been copied. This is a null-terminated Unicode string and can be NULL. If NULL, the name of the - /// destination item is the same as the source. - /// public event EventHandler PreCopyItem; /// Performs caller-implemented actions before the delete process for each item begins. - /// bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions. - /// Pointer to an IShellItem that specifies the item to be deleted. public event EventHandler PreDeleteItem; /// Performs caller-implemented actions before the move process for each item begins. - /// bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions. - /// Pointer to an IShellItem that specifies the item to be moved. - /// Pointer to an IShellItem that specifies the destination folder to contain the moved item. - /// - /// Pointer to a new name for the item in its new location. This is a null-terminated Unicode string and can be NULL. If NULL, the name of the - /// destination item is the same as the source. - /// public event EventHandler PreMoveItem; /// Performs caller-implemented actions before the process to create a new item begins. - /// bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions. - /// Pointer to an IShellItem that specifies the destination folder that will contain the new item. - /// Pointer to the file name of the new item, for instance Newfile.txt. This is a null-terminated, Unicode string. public event EventHandler PreNewItem; /// Performs caller-implemented actions before the rename process for each item begins. - /// bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions. - /// Pointer to an IShellItem that specifies the item to be renamed. - /// Pointer to the new display name of the item. This is a null-terminated, Unicode string. public event EventHandler PreRenameItem; /// Performs caller-implemented actions before any specific file operations are performed. public event EventHandler StartOperations; /// Updates the progress. - /// The i work total. - /// The i work so far. public event System.ComponentModel.ProgressChangedEventHandler UpdateProgress; /// Flags that control the file operation. diff --git a/Windows.Shell/ShellImageList.cs b/Windows.Shell/ShellImageList.cs index d5f6b6e3..8ce4213d 100644 --- a/Windows.Shell/ShellImageList.cs +++ b/Windows.Shell/ShellImageList.cs @@ -46,7 +46,7 @@ namespace Vanara.Windows.Shell /// Gets the Shell icon for the given file name or extension. /// The file name or extension . - /// Flags to specify the type of the icon to retrieve. This uses the method and can only retrieve small or large icons. + /// Flags to specify the type of the icon to retrieve. This uses the method and can only retrieve small or large icons. /// An instance if found; otherwise . public static Icon GetFileIcon(string fileNameOrExtension, ShellIconType iconType = ShellIconType.Large) { diff --git a/Windows.Shell/ShellItem.cs b/Windows.Shell/ShellItem.cs index c5f62047..6eb7b9e0 100644 --- a/Windows.Shell/ShellItem.cs +++ b/Windows.Shell/ShellItem.cs @@ -432,7 +432,6 @@ namespace Vanara.Windows.Shell public bool IsFolder => iShellItem.GetAttributes(SFGAO.SFGAO_FOLDER) != 0; /// Gets the IShellItem instance of the current ShellItem. - /// A ShellItem instance. public IShellItem IShellItem => iShellItem; /// Gets a value indicating whether this instance is link.