Updated comments

pull/25/head
David Hall 2018-11-28 12:33:55 -07:00
parent 9e6c1629a3
commit 8a1355b0af
81 changed files with 280 additions and 433 deletions

View File

@ -44,8 +44,8 @@ namespace Vanara.Collections
protected IEnumerable<KeyValuePair<TKey, TValue>> Items =>
Keys.Select(k => new KeyValuePair<TKey, TValue>(k, this[k]));
/// <summary>Gets or sets the <see cref="TValue"/> with the specified key.</summary>
/// <value>The <see cref="TValue"/>.</value>
/// <summary>Gets or sets the value with the specified key.</summary>
/// <value>The value.</value>
/// <param name="key">The key.</param>
/// <returns></returns>
public virtual TValue this[TKey key]

View File

@ -48,7 +48,7 @@ namespace Vanara.Extensions
/// <param name="startIdx">The zero-based start index of the bit range to set.</param>
/// <param name="count">The number of sequential bits to set starting at <paramref name="startIdx"/>.</param>
/// <param name="value">The value to set within the specified range of <paramref name="bits"/>.</param>
public static void SetBits<T, TValue>(ref T bits, byte startIdx, byte count, TValue value) where T : struct, IComparable, IComparable<T>, IConvertible, IEquatable<T>, IFormattable where TValue : struct, IComparable, IComparable<T>, IConvertible, IEquatable<T>, IFormattable
public static void SetBits<T, TValue>(ref T bits, byte startIdx, byte count, TValue value) where T : struct, IComparable, IComparable<T>, IConvertible, IEquatable<T>, IFormattable where TValue : struct, IComparable, IComparable<TValue>, IConvertible, IEquatable<TValue>, 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));

View File

@ -630,8 +630,8 @@ namespace Vanara.PInvoke
}
/// <summary>
/// Combines the <see cref="SI_PAGE_TYPE"/> and <see cref="SI_PAGE_ACTIVATED"/> types for use in the last parameter of <see
/// cref="EditSecurityAdvanced(System.IntPtr,ISecurityInformation,uint)"/> method.
/// Combines the <see cref="SI_PAGE_TYPE"/> and <see cref="SI_PAGE_ACTIVATED"/> types for use in the last parameter of
/// <see cref="EditSecurityAdvanced(HWND, ISecurityInformation, SI_PAGE_TYPE, SI_PAGE_ACTIVATED)"/> method.
/// </summary>
/// <param name="pt">The <see cref="SI_PAGE_TYPE"/> value.</param>
/// <param name="pa">The <see cref="SI_PAGE_ACTIVATED"/> value.</param>

View File

@ -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);
/// <summary>
/// Contains information used when searching for a list-view item. This structure is identical to LV_FINDINFO but has been renamed to

View File

@ -81,7 +81,7 @@ namespace Vanara.PInvoke
/// </param>
/// <param name="Msg">The message to be sent.</param>
/// <param name="wParam">Additional message-specific information.</param>
/// <param name="splitInfo">Additional message-specific information.</param>
/// <param name="progressRange">Additional message-specific information.</param>
/// <returns>The return value specifies the result of the message processing; it depends on the message sent.</returns>
[DllImport(Lib.User32, SetLastError = false, CharSet = CharSet.Auto)]
public static extern IntPtr SendMessage(HWND hWnd, ProgressMessage Msg, bool wParam, ref PBRANGE progressRange);

View File

@ -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.
/// <summary>Defines the frame and pages of a property sheet.</summary>

View File

@ -252,7 +252,7 @@ namespace Vanara.PInvoke
/// <param name="splitInfo">Additional message-specific information.</param>
/// <returns>The return value specifies the result of the message processing; it depends on the message sent.</returns>
[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);
/// <summary>
/// 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
/// <param name="splitInfo">Additional message-specific information.</param>
/// <returns>The return value specifies the result of the message processing; it depends on the message sent.</returns>
[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);
/// <summary>Contains information about a hit test. This structure supersedes the TC_HITTESTINFO structure.</summary>
[PInvokeData("Commctrl.h", MSDNShortId = "bb760553")]

View File

@ -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);
/// <summary>
/// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling <see
/// cref="InitCommonControlsEx(ref INITCOMMONCONTROLSEX)"/>.
/// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling <see cref="InitCommonControlsEx(in INITCOMMONCONTROLSEX)"/>.
/// </summary>
[PInvokeData("Commctrl.h", MSDNShortId = "bb775507")]
[Flags]
@ -1167,8 +1166,8 @@ namespace Vanara.PInvoke
}
/// <summary>
/// Carries information used to load common control classes from the dynamic-link library (DLL). This structure is used with the <see
/// cref="InitCommonControlsEx(ref INITCOMMONCONTROLSEX)"/> function.
/// Carries information used to load common control classes from the dynamic-link library (DLL). This structure is used with the
/// <see cref="InitCommonControlsEx(in INITCOMMONCONTROLSEX)"/> function.
/// </summary>
[PInvokeData("Commctrl.h", MSDNShortId = "bb775507")]
[StructLayout(LayoutKind.Sequential)]
@ -1178,8 +1177,8 @@ namespace Vanara.PInvoke
public int dwSize;
/// <summary>
/// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling <see
/// cref="InitCommonControlsEx(ref INITCOMMONCONTROLSEX)"/>.
/// The set of bit flags that indicate which common control classes will be loaded from the DLL when calling
/// <see cref="InitCommonControlsEx(in INITCOMMONCONTROLSEX)"/>.
/// </summary>
public CommonControlClass dwICC;

View File

@ -358,7 +358,7 @@ namespace Vanara.PInvoke
/// <returns>Returns the index of the new item or , if the append action fails.</returns>
// 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);
/// <summary>
/// <para>

View File

@ -98,12 +98,12 @@ namespace Vanara.PInvoke
public static Pen ToPen(this SafeHPEN hpen) => ((HPEN)hpen).ToPen();
/// <summary>Creates a <see cref="Region"/> from an <see cref="HRGN"/>.</summary>
/// <param name="hpen">The HRGN value.</param>
/// <param name="hrgn">The HRGN value.</param>
/// <returns>The Region instance.</returns>
public static Region ToRegion(this in HRGN hrgn) => hrgn.IsNull ? null : Region.FromHrgn((IntPtr)hrgn);
/// <summary>Creates a <see cref="Region"/> from an <see cref="HRGN"/>.</summary>
/// <param name="hpen">The HRGN value.</param>
/// <param name="hrgn">The HRGN value.</param>
/// <returns>The Region instance.</returns>
public static Region ToRegion(this SafeHRGN hrgn) => ((HRGN)hrgn).ToRegion();

View File

@ -1,5 +1,6 @@
using System;
using System.Drawing;
using System.Runtime.InteropServices;
namespace Vanara.PInvoke
{
@ -43,7 +44,7 @@ namespace Vanara.PInvoke
}
/// <summary>Initializes a new instance of the <see cref="GdiObjectContext"/> class.</summary>
/// <param name="hdc">The device context into which <paramref name="hObj"/> is selected.</param>
/// <param name="dc">The device context into which <paramref name="hObj"/> is selected.</param>
/// <param name="hObj">The graphics object to select.</param>
/// <exception cref="ArgumentNullException">dc - Device context cannot be null.</exception>
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
}
/// <summary>
/// Provides a <see cref="SafeHandle"/> to a graphics bitmap object that releases a created HBITMAP instance at disposal using DeleteObject.
/// Provides a <see cref="System.Runtime.InteropServices.SafeHandle"/> to a graphics bitmap object that releases a created HBITMAP instance at disposal using DeleteObject.
/// </summary>
public class SafeHBITMAP : HANDLE
{

View File

@ -597,7 +597,7 @@ namespace Vanara.PInvoke
}
/// <summary>Converts a height in logical units to pixels.</summary>
/// <param name="width">The height in logical units.</param>
/// <param name="height">The height in logical units.</param>
/// <param name="hdc">The device context handle.</param>
/// <returns>The height in pixels.</returns>
public static int LogicalHeightToDeviceWidth(int height, HDC hdc = default)

View File

@ -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);
/// <summary>The GetExtendedTcpTable function retrieves a table that contains a list of TCP endpoints available to the application.</summary>
/// <typeparam name="T">The type that is defined as the table associated with the <paramref name="TableClass"/> value.</typeparam>
@ -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);
/// <summary>The GetIpNetTable function retrieves the IPv4 to physical address mapping table.</summary>
/// <param name="sorted">

View File

@ -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);
/// <summary>
/// <para>The <c>GetIfTable2Ex</c> function retrieves the MIB-II interface table.</para>
@ -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);
/// <summary>
/// <para>

View File

@ -2749,7 +2749,7 @@ namespace Vanara.PInvoke
[DefaultProperty(nameof(table))]
public class MIB_IFTABLE : SafeElementArray<MIB_IFROW, uint, CoTaskMemoryMethods>
{
/// <summary>Initializes a new instance of the <see cref="_MIB_IFTABLE"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="MIB_IFTABLE"/> class.</summary>
/// <param name="byteSize">Amount of space, in bytes, to reserve.</param>
public MIB_IFTABLE(uint byteSize) : base((int)byteSize, 0)
{
@ -2803,7 +2803,7 @@ namespace Vanara.PInvoke
[DefaultProperty(nameof(table))]
public class MIB_IPADDRTABLE : SafeElementArray<MIB_IPADDRROW, uint, CoTaskMemoryMethods>
{
/// <summary>Initializes a new instance of the <see cref="_MIB_IPADDRTABLE"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="MIB_IPADDRTABLE"/> class.</summary>
/// <param name="byteSize">Amount of space, in bytes, to reserve.</param>
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<MIB_TCP6ROW_OWNER_PID, uint, CoTaskMemoryMethods>
{
/// <summary>Initializes a new instance of the <see cref="_MIB_TCP6TABLE_OWNER_PID"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="MIB_TCP6TABLE_OWNER_PID"/> class.</summary>
/// <param name="byteSize">Amount of space, in bytes, to reserve.</param>
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<MIB_TCPROW, uint, CoTaskMemoryMethods>
{
/// <summary>Initializes a new instance of the <see cref="_MIB_TCPTABLE"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="MIB_TCPTABLE"/> class.</summary>
/// <param name="byteSize">Amount of space, in bytes, to reserve.</param>
public MIB_TCPTABLE(uint byteSize) : base((int)byteSize, 0)
{

View File

@ -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);
/// <summary>
/// Formats time as a time string for a locale specified by identifier. The function formats either a specified time or the local

View File

@ -98,9 +98,7 @@ namespace Vanara.PInvoke
}
/// <summary>
/// Flags passed to the <see
/// cref="Kernel32.FormatMessage(Vanara.PInvoke.Kernel32.FormatMessageFlags,Vanara.PInvoke.Kernel32.HINSTANCE,uint,uint,ref
/// System.IntPtr,uint,string[])"/> method.
/// Flags passed to the <see cref="FormatMessage(uint, string[], HINSTANCE, FormatMessageFlags, uint)"/> method.
/// </summary>
[PInvokeData("winbase.h")]
[Flags]
@ -271,8 +269,8 @@ namespace Vanara.PInvoke
/// <term>FORMAT_MESSAGE_FROM_HMODULE0x00000800</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// <item>
@ -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);
/// <summary>
/// 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
/// <term>FORMAT_MESSAGE_FROM_HMODULE0x00000800</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// <item>
@ -599,11 +597,9 @@ namespace Vanara.PInvoke
/// </para>
/// <para>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</para>
/// </returns>
// 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);
/// <summary>
/// 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.
/// </summary>
/// <param name="dwFlags">
/// <para>
/// <param name="dwFlags"><para>
/// 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.
/// </para>
/// <para>This parameter can be one or more of the following values.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>FORMAT_MESSAGE_ALLOCATE_BUFFER0x00000100</term>
/// <term>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>FORMAT_MESSAGE_ALLOCATE_BUFFER0x00000100</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_ARGUMENT_ARRAY0x00002000</term>
/// <term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_ARGUMENT_ARRAY0x00002000</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_HMODULE0x00000800</term>
/// <term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_HMODULE0x00000800</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_STRING0x00000400</term>
/// <term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_STRING0x00000400</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_SYSTEM0x00001000</term>
/// <term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_SYSTEM0x00001000</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_IGNORE_INSERTS0x00000200</term>
/// <term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_IGNORE_INSERTS0x00000200</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// </list>
/// </item>
/// </list>
/// </para>
/// <para>
/// 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.
/// </para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>0</term>
/// <term>
/// <list type="table">
/// <listheader>
/// <term>Value</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>0</term>
/// <term>
/// There are no output line width restrictions. The function stores line breaks that are in the message definition text into the
/// output buffer.
/// </term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_MAX_WIDTH_MASK0x000000FF</term>
/// <term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_MAX_WIDTH_MASK0x000000FF</term>
/// <term>
/// 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.
/// </term>
/// </item>
/// </list>
/// </item>
/// </list>
/// </para>
/// <para>
/// If the low-order byte is a nonzero value other than <c>FORMAT_MESSAGE_MAX_WIDTH_MASK</c>, 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.
/// </para>
/// </param>
/// <param name="lpSource">
/// <para>The location of the message definition. The type of this parameter depends upon the settings in the dwFlags parameter.</para>
/// </para></param>
/// <param name="lpSource"><para>The location of the message definition. The type of this parameter depends upon the settings in the dwFlags parameter.</para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>dwFlags Setting</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_HMODULE0x00000800</term>
/// <term>A handle to the module that contains the message table to search.</term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_STRING0x00000400</term>
/// <term>Pointer to a string that consists of unformatted message text. It will be scanned for inserts and formatted accordingly.</term>
/// </item>
/// </list>
/// <list type="table">
/// <listheader>
/// <term>dwFlags Setting</term>
/// <term>Meaning</term>
/// </listheader>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_HMODULE0x00000800</term>
/// <term>A handle to the module that contains the message table to search.</term>
/// </item>
/// <item>
/// <term>FORMAT_MESSAGE_FROM_STRING0x00000400</term>
/// <term>Pointer to a string that consists of unformatted message text. It will be scanned for inserts and formatted accordingly.</term>
/// </item>
/// </list>
/// </para>
/// <para>If neither of these flags is set in dwFlags, then lpSource is ignored.</para>
/// </param>
/// <para>If neither of these flags is set in dwFlags, then lpSource is ignored.</para></param>
/// <param name="dwMessageId">The message identifier for the requested message. This parameter is ignored if dwFlags includes <c>FORMAT_MESSAGE_FROM_STRING</c>.</param>
/// <param name="dwLanguageId">
/// <para>The language identifier for the requested message. This parameter is ignored if dwFlags includes <c>FORMAT_MESSAGE_FROM_STRING</c>.</para>
/// <param name="dwLanguageId"><para>The language identifier for the requested message. This parameter is ignored if dwFlags includes <c>FORMAT_MESSAGE_FROM_STRING</c>.</para>
/// <para>
/// If you pass a specific <c>LANGID</c> in this parameter, <c>FormatMessage</c> will return a message for that <c>LANGID</c> only.
/// If the function cannot find a message for that <c>LANGID</c>, it sets Last-Error to <c>ERROR_RESOURCE_LANG_NOT_FOUND</c>. If you
@ -743,25 +734,20 @@ namespace Vanara.PInvoke
/// <para>
/// If <c>FormatMessage</c> does not locate a message for any of the preceding <c>LANGIDs</c>, it returns any language message string
/// that is present. If that fails, it returns <c>ERROR_RESOURCE_LANG_NOT_FOUND</c>.
/// </para>
/// </param>
/// <param name="lpBuffer">
/// <para>
/// </para></param>
/// <param name="lpBuffer"><para>
/// A pointer to a buffer that receives the null-terminated string that specifies the formatted message. If dwFlags includes
/// <c>FORMAT_MESSAGE_ALLOCATE_BUFFER</c>, the function allocates a buffer using the <c>LocalAlloc</c> function, and places the
/// pointer to the buffer at the address specified in lpBuffer.
/// </para>
/// <para>This buffer cannot be larger than 64K bytes.</para>
/// </param>
/// <param name="nSize">
/// <para>
/// <para>This buffer cannot be larger than 64K bytes.</para></param>
/// <param name="nSize"><para>
/// If the <c>FORMAT_MESSAGE_ALLOCATE_BUFFER</c> flag is not set, this parameter specifies the size of the output buffer, in
/// <c>TCHARs</c>. If <c>FORMAT_MESSAGE_ALLOCATE_BUFFER</c> is set, this parameter specifies the minimum number of <c>TCHARs</c> to
/// allocate for an output buffer.
/// </para>
/// <para>The output buffer cannot be larger than 64K bytes.</para>
/// </param>
/// <param name="Arguments">
/// <para>The output buffer cannot be larger than 64K bytes.</para></param>
/// <param name="__arglist">
/// <para>
/// 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.

View File

@ -24,7 +24,7 @@ namespace Vanara.PInvoke
/// <summary>A value returned when invalid file attributes are found.</summary>
[PInvokeData("fileapi.h")] public const int INVALID_FILE_ATTRIBUTES = -2;
/// <summary>A value returned by <see cref="GetCompressedFileSize(string, ref uint)"/> when the function fails.</summary>
/// <summary>A value returned by <see cref="GetCompressedFileSize(string, out uint)"/> when the function fails.</summary>
[PInvokeData("fileapi.h")] public const uint INVALID_FILE_SIZE = 0xFFFFFFFF;
/// <summary>A value returned then a file pointer cannot be set.</summary>

View File

@ -101,8 +101,8 @@ namespace Vanara.PInvoke
/// handle to a process or thread, respectively.
/// </para>
/// </returns>
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;
/// <summary>Duplicates an object handle.</summary>
/// <param name="hSourceProcessHandle">

View File

@ -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.
/// </summary>
/// <param name="hHeap">A handle to a heap created using <see cref="HeapCreate"/> or <see cref="GetProcessHeap"/>.</param>
/// <param name="bytes">Array of unmanaged pointers</param>
/// <returns>SafeHGlobalHandle object to an native (unmanaged) array of pointers</returns>
public SafeHeapBlock(byte[] bytes) : base(bytes) { }

View File

@ -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);
/// <summary>
/// <para>

View File

@ -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);
/// <summary>Retrieves limit and job state information from the job object.</summary>
/// <param name="hJob">
@ -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);
/// <summary>Gets information about the control of the I/O rate for a job object.</summary>
/// <param name="hJob">
@ -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);
/// <summary>Sets I/O limits on a job object.</summary>
/// <param name="hJob">

View File

@ -167,7 +167,7 @@ namespace Vanara.PInvoke
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS = 0x00000004,
}
/// <summary>Flags that may be passed to the <see cref="LoadLibraryEx"/> function.</summary>
/// <summary>Flags that may be passed to the <see cref="LoadLibraryEx(string, IntPtr, LoadLibraryExFlags)"/> function.</summary>
[PInvokeData("libloaderapi.h")]
[Flags]
public enum LoadLibraryExFlags

View File

@ -2970,7 +2970,7 @@ namespace Vanara.PInvoke
/// <summary>Provides a <see cref="SafeHandle"/> to a memory resource notification object that releases its instance at disposal using CloseHandle.</summary>
public class SafeMemoryResourceNotification : SafeSyncHandle
{
/// <summary>Initializes a new instance of the <see cref="MemoryResourceNotification"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeMemoryResourceNotification"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle"><see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).</param>
public SafeMemoryResourceNotification(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }

View File

@ -58,7 +58,7 @@ namespace Vanara.PInvoke
PIPE_NOWAIT = 0x00000001,
/// <summary>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.</summary>
PIPE_READMODE_BYTE = 0x00000000,
/// <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./summary>
/// <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.</summary>
PIPE_READMODE_MESSAGE = 0x00000002,
/// <summary>
/// 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

View File

@ -357,7 +357,7 @@ namespace Vanara.PInvoke
/// <summary>Represents a block of environment strings obtained by <see cref="GetEnvironmentStrings"/> and freed by <see cref="FreeEnvironmentStrings"/>.</summary>
/// <seealso cref="Vanara.InteropServices.GenericSafeHandle"/>
/// <seealso cref="System.Collections.Generic.IEnumerable{string}"/>
/// <seealso cref="System.Collections.Generic.IEnumerable{T}"/>
public sealed class EnvironmentStrings : GenericSafeHandle, IEnumerable<string>
{
/// <summary>Initializes a new instance of the <see cref="EnvironmentStrings"/> class.</summary>

View File

@ -171,7 +171,7 @@ namespace Vanara.PInvoke
SYNCHRONIZATION_BARRIER_FLAGS_NO_DELETE = 0x04,
}
/// <summary>Values returned by <see cref="SignalObjectAndWait"/>.</summary>
/// <summary>Values returned by <see cref="SignalObjectAndWait(IntPtr, IntPtr, uint, bool)"/>.</summary>
public enum WAIT_STATUS : uint
{
/// <summary>
@ -2245,7 +2245,7 @@ namespace Vanara.PInvoke
private static readonly SafeEventHandle nullEvent = new SafeEventHandle(IntPtr.Zero, false);
/// <summary>Initializes a new instance of the <see cref="Register"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeRegisteredWaitHandle"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).

View File

@ -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);
/// <summary>
/// <para>Retrieves the path of the Windows directory.</para>
@ -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);
/// <summary>
/// Sets the bits of a 64-bit value to indicate the comparison operator to use for a specified operating system version attribute.

View File

@ -249,7 +249,7 @@ namespace Vanara.PInvoke
/// A pointer to a <c>SYSTEMTIME</c> structure that specifies the UTC time to be converted. The function converts this universal time to the specified
/// time zone's corresponding local time.
/// </param>
/// <param name="lpUniversalTime">A pointer to a <c>SYSTEMTIME</c> structure that receives the local time.</param>
/// <param name="lpLocalTime">A pointer to a <c>SYSTEMTIME</c> structure that receives the local time.</param>
/// <returns>If the function fails, the return value is zero. To get extended error information, call <c>GetLastError</c>.</returns>
// 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

View File

@ -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);
/// <summary>The <c>DeactivateActCtx</c> function deactivates the activation context corresponding to the specified cookie.</summary>
/// <param name="dwFlags">
@ -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);
/// <summary>
/// The <c>QueryActCtxSettingsW</c> function specifies the activation context, and the namespace and name of the attribute that is to be queried.

View File

@ -2518,6 +2518,7 @@ namespace Vanara.PInvoke
/// <param name="first">The method that gets the first value.</param>
/// <param name="next">The method that gets the next value.</param>
/// <param name="strSz">The string buffer length.</param>
/// <param name="done">The error value that indicates the enumeration has completed.</param>
/// <returns>List of strings returned by <paramref name="first"/> and <paramref name="next"/> methods.</returns>
private static IEnumerable<string> EnumFindMethods<THandle>(FindFirstDelegate<THandle> first, FindNextDelegate<THandle> next, uint strSz = MAX_PATH + 1, int done = Win32Error.ERROR_HANDLE_EOF) where THandle : SafeHandle
{

View File

@ -144,14 +144,14 @@ namespace Vanara.PInvoke
/// </summary>
public class SafeMailslotHandle : SafeKernelHandle
{
/// <summary>Initializes a new instance of the <see cref="MailslotHandle"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeMailslotHandle"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
public SafeMailslotHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="MailslotHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeMailslotHandle"/> class.</summary>
private SafeMailslotHandle() : base() { }
}
}

View File

@ -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);
/// <summary>The thread's execution requirements.</summary>
public enum EXECUTION_STATE : uint

View File

@ -7634,14 +7634,14 @@ namespace Vanara.PInvoke
/// <summary>Provides a <see cref="SafeHandle"/> to a that releases a created PowerRequestObject instance at disposal using CloseHandle.</summary>
public class SafePowerRequestObject : SafeKernelHandle
{
/// <summary>Initializes a new instance of the <see cref="PowerRequestObject"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafePowerRequestObject"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
public SafePowerRequestObject(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="PowerRequestObject"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafePowerRequestObject"/> class.</summary>
private SafePowerRequestObject() : base() { }
}
@ -7650,14 +7650,14 @@ namespace Vanara.PInvoke
/// </summary>
public class SafePUMS_COMPLETION_LIST : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="UmsCompletionList"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafePUMS_COMPLETION_LIST"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
public SafePUMS_COMPLETION_LIST(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="UmsCompletionList"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafePUMS_COMPLETION_LIST"/> class.</summary>
private SafePUMS_COMPLETION_LIST() : base() { }
/// <inheritdoc/>
@ -7669,14 +7669,14 @@ namespace Vanara.PInvoke
/// </summary>
public class SafePUMS_CONTEXT : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="UmsThreadContext"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafePUMS_CONTEXT"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
public SafePUMS_CONTEXT(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="UmsThreadContext"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafePUMS_CONTEXT"/> class.</summary>
private SafePUMS_CONTEXT() : base() { }
/// <inheritdoc/>

View File

@ -333,8 +333,10 @@ namespace Vanara.PInvoke
/// </summary>
CONSOLE_FULLSCREEN = 1,
/// <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./summary>
/// <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.
/// </summary>
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);
/// <summary>Retrieves all defined console aliases for the specified executable.</summary>
/// <param name="lpAliasBuffer">
@ -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);
/// <summary>Retrieves the required size for the buffer used by the <c>GetConsoleAliases</c> function.</summary>
/// <param name="lpExeName">The name of the executable file whose console aliases are to be retrieved.</param>

View File

@ -848,7 +848,7 @@ namespace Vanara.PInvoke
/// <summary>Language Group Identifier.</summary>
public enum LGRPID : uint
{
/// <summary>Western Europe & U.S.</summary>
/// <summary>Western Europe and U.S.</summary>
LGRPID_WESTERN_EUROPE = 0x0001,
/// <summary>Central Europe</summary>

View File

@ -3258,12 +3258,12 @@ namespace Vanara.PInvoke
/// <summary>Provides a <see cref="SafeHandle"/> to a WNet enumeration that releases a created WNetEnumHandle instance at disposal using WNetCloseEnum.</summary>
public class SafeWNetEnumHandle : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="WNetEnumHandle"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeWNetEnumHandle"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle"><see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).</param>
public SafeWNetEnumHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="WNetEnumHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeWNetEnumHandle"/> class.</summary>
private SafeWNetEnumHandle() : base() { }
/// <inheritdoc/>

View File

@ -39,7 +39,6 @@ namespace Vanara.PInvoke
/// components are optional. The &lt;port number&gt; component must be a numeric string value.
/// </para>
/// </param>
/// <param name="&amp;lt;service class&amp;gt;/&amp;lt;instance name&amp;gt;:&amp;lt;port number&amp;gt;/&amp;lt;service name&amp;gt;&#xA;"/>
/// <param name="pcServiceClass">
/// <para>
/// Pointer to a <c>DWORD</c> value that, on entry, contains the size, in <c>TCHARs</c>, of the ServiceClass buffer, including the
@ -224,9 +223,10 @@ namespace Vanara.PInvoke
/// The <c>DsGetRdnW</c> 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.
/// </summary>
/// <param name="ppDN">Address of a string that contains the distinguished name string to be parsed.</param>
/// <param name="ppKey">A string that, if the function succeeds, receives the key in the relative distinguished name string.</param>
/// <param name="ppVal">A string that, if the function is successful, receives the value in the relative distinguished name string.</param>
/// <param name="fullDN">Address of a string that contains the distinguished name string to be parsed.</param>
/// <param name="dn">A string that recieves the remainder of the distinguished name exclusive of current relative distinguished name.</param>
/// <param name="key">A string that, if the function succeeds, receives the key in the relative distinguished name string.</param>
/// <param name="val">A string that, if the function is successful, receives the value in the relative distinguished name string.</param>
/// <returns>Returns <c>ERROR_SUCCESS</c> if successful or a Win32 error code otherwise.</returns>
[PInvokeData("dsparse.h", MSDNShortId = "22627f2e-adfb-49de-bae5-20aaf69830ac")]
public static Win32Error DsGetRdnW(string fullDN, out string dn, out string key, out string val)

View File

@ -842,27 +842,28 @@ namespace Vanara.PInvoke
/// <para>Identifies the format of the SPNs to compose. The ServiceType parameter can have one of the following values.</para>
/// <para>DS_SPN_DNS_HOST, DS_SPN_DN_HOST, DS_SPN_NB_HOST</para>
/// <para>The SPNs have the following format.</para>
/// </param>
/// <param name="ServiceClass/ InstanceName: InstancePort&#xA;">
/// <para>
/// The ServiceName parameter must be <c>NULL</c>. This is the SPN format for a host-based service, which provides services
/// identified with its host computer. The InstancePort component is optional.
/// </para>
/// <para>The</para>
/// <para>ServiceName</para>
/// <para>parameter must be</para>
/// <para>NULL</para>
/// <para>. This is the SPN format for a host-based service, which provides services identified with its host computer. The</para>
/// <para>InstancePort</para>
/// <para>component is optional.</para>
/// <para>DS_SPN_DOMAIN, DS_SPN_NB_DOMAIN</para>
/// <para>The SPNs have the following format.</para>
/// </param>
/// <param name="ServiceClass/ InstanceName: InstancePort/ ServiceName&#xA;">
/// <para>The</para>
/// <para>ServiceName</para>
/// <para>
/// 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.
/// </para>
/// <para>DS_SPN_SERVICE</para>
/// <para>The SPNs have the following format.</para>
/// </param>
/// <param name="ServiceClass/ InstanceName: InstancePort/ ServiceName&#xA;">
/// <para>The</para>
/// <para>ServiceName</para>
/// <para>
/// 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.
/// </para>
/// </param>
/// <param name="ServiceClass">
@ -941,9 +942,8 @@ namespace Vanara.PInvoke
/// to authenticate the service.
/// </para>
/// </remarks>
// 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,

View File

@ -2007,12 +2007,12 @@ namespace Vanara.PInvoke
/// <summary>Provides a <see cref="SafeHandle"/> to a resource manager that releases its handle at disposal using NTClose.</summary>
public class SafeResourceManagerHandle : SafeNtHandle
{
/// <summary>Initializes a new instance of the <see cref="ResourceManagerHandle"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeResourceManagerHandle"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle"><see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).</param>
public SafeResourceManagerHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="ResourceManagerHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeResourceManagerHandle"/> class.</summary>
private SafeResourceManagerHandle() : base() { }
}
@ -2818,6 +2818,7 @@ namespace Vanara.PInvoke
/// <param name="SystemInformationLength">
/// <para>The size of the buffer pointed to by the SystemInformationparameter, in bytes.</para>
/// </param>
/// <param name="ReturnLength"/>
/// <returns>
/// <para>Returns an NTSTATUS success or error code.</para>
/// <para>
@ -4136,12 +4137,12 @@ namespace Vanara.PInvoke
/// <summary>Provides a <see cref="SafeHandle"/> to an object that releases a created handle at disposal using NtClose.</summary>
public abstract class SafeNtHandle : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="NtHandle"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeNtHandle"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle"><see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).</param>
public SafeNtHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="NtHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeNtHandle"/> class.</summary>
protected SafeNtHandle() : base() { }
#pragma warning disable CS0612 // Type or member is obsolete

View File

@ -125,7 +125,7 @@ namespace Vanara.PInvoke
DS_DOMAIN_DIRECT_INBOUND = 0x0020,
}
/// <summary>Flags supporting behavior of <see cref="DsGetDcName"/>.</summary>
/// <summary>Flags supporting behavior of <see cref="DsGetDcName(string, string, in Guid, string, DsGetDcNameFlags, out SafeNetApiBuffer)"/>.</summary>
[Flags]
[PInvokeData("DsGetDC.h", MSDNShortId = "ms675983")]
public enum DsGetDcNameFlags : uint
@ -1279,14 +1279,14 @@ namespace Vanara.PInvoke
/// </summary>
public class SafeDCEnumHandle : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="DCEnumHandle"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeDCEnumHandle"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
public SafeDCEnumHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="DCEnumHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeDCEnumHandle"/> class.</summary>
private SafeDCEnumHandle() : base() { }
/// <inheritdoc/>

View File

@ -2319,14 +2319,14 @@ namespace Vanara.PInvoke
/// <summary>Provides a <see cref="SafeHandle"/> to a buffer that releases a created handle at disposal using NetApiBufferFree.</summary>
public class SafeNetApiBuffer : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="NetApiBuffer"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeNetApiBuffer"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
public SafeNetApiBuffer(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="NetApiBuffer"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeNetApiBuffer"/> class.</summary>
private SafeNetApiBuffer() : base() { }
/// <summary>Returns an extracted structure from this buffer.</summary>

View File

@ -333,30 +333,9 @@ namespace Vanara.PInvoke
/// point later. The new enumerator supports the same IEnumSTATPROPSTG interface.
/// </para>
/// </summary>
/// <param name="ppenum">
/// <returns>
/// <para>A pointer to the variable that receives the IEnumSTATPROPSTG interface pointer.</para>
/// <para>If the method is unsuccessful, the value of the parameter is undefined.</para>
/// </param>
/// <returns>
/// <para>This method supports the following return values.</para>
/// <list type="table">
/// <listheader>
/// <term>Return code</term>
/// <term>Description</term>
/// </listheader>
/// <item>
/// <term>E_INVALIDARG</term>
/// <term>The parameter is NULL.</term>
/// </item>
/// <item>
/// <term>E_OUTOFMEMORY</term>
/// <term>Insufficient memory.</term>
/// </item>
/// <item>
/// <term>E_UNEXPECTED</term>
/// <term>An unexpected exception occurred.</term>
/// </item>
/// </list>
/// </returns>
// https://docs.microsoft.com/en-us/windows/desktop/api/propidl/nf-propidl-ienumstatpropstg-clone
IEnumSTATPROPSTG Clone();
@ -455,7 +434,7 @@ namespace Vanara.PInvoke
/// </remarks>
// 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);
/// <summary>
/// <para>The <c>Open</c> method opens a property set contained in the property set storage object.</para>
@ -551,7 +530,7 @@ namespace Vanara.PInvoke
/// </remarks>
// 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);
/// <summary>
/// <para>The <c>Delete</c> method deletes one of the property sets contained in the property set storage object.</para>

View File

@ -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);
/// <summary>
/// <para>Creates and returns a one-dimensional safe array of the specified VARTYPE and bounds.</para>
@ -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);
/// <summary>
/// <para>Gets the GUID of the interface contained within the specified safe array.</para>

View File

@ -139,8 +139,7 @@ namespace Vanara.PInvoke
/// <summary>
/// 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 <see cref="ISecurityInformation.GetObjectInformation(ref SI_OBJECT_INFO)"/> specifies the
/// SI_CONTAINER flag.
/// security page only if the SI_CONTAINER flag is also set.
/// </summary>
SI_ACCESS_CONTAINER = 0x00040000,

View File

@ -1202,8 +1202,6 @@ namespace Vanara.PInvoke
/// A pointer to the function used to track the progress of the <c>TreeResetNamedSecurityInfo</c> function. The prototype of the
/// progress function is:
/// </para>
/// </param>
/// <param name="#include &amp;lt;windows.h&amp;gt;&#xA;#include &amp;lt;Aclapi.h&amp;gt;&#xA;&#xA;typedef VOID (*FN_PROGRESS) (&#xA; IN LPWSTR pObjectName, // Name of object just processed&#xA; IN DWORD Status, // Status of operation on object&#xA; IN OUT PPROG_INVOKE_SETTING pInvokeSetting, // When to set&#xA; IN PVOID Args, // Caller specific data&#xA; IN BOOL SecuritySet // Whether security was set&#xA;);&#xA;&#xA;">
/// <para>
/// 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, <c>TreeResetNamedSecurityInfo</c> 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 <c>TreeSetNamedSecurityInfo</c> function. The prototype of the
/// progress function is:
/// </para>
/// </param>
/// <param name="#include &amp;lt;windows.h&amp;gt;&#xA;#include &amp;lt;Aclapi.h&amp;gt;&#xA;#pragma comment(lib, &amp;quot;AdvApi32.lib&amp;quot;)&#xA;&#xA;typedef VOID (*FN_PROGRESS) (&#xA; IN LPWSTR pObjectName, // Name of object just processed&#xA; IN DWORD Status, // Status of operation on object&#xA; IN OUT PPROG_INVOKE_SETTING&#xA; pInvokeSetting, // When to set&#xA; IN PVOID Args, // Caller specific data&#xA; IN BOOL SecuritySet // Whether security was set&#xA;);&#xA;&#xA;">
/// <para>
/// 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, <c>TreeSetNamedSecurityInfo</c> passes the name of the last

View File

@ -1878,14 +1878,14 @@ namespace Vanara.PInvoke
/// </summary>
public class SafeLsaMemoryHandle : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="LsaMemoryHandle"/> class and assigns an existing handle.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaMemoryHandle"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
public SafeLsaMemoryHandle(IntPtr preexistingHandle, bool ownsHandle = true) : base(preexistingHandle, ownsHandle) { }
/// <summary>Initializes a new instance of the <see cref="LsaMemoryHandle"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeLsaMemoryHandle"/> class.</summary>
private SafeLsaMemoryHandle() : base() { }
/// <inheritdoc/>

View File

@ -35,7 +35,6 @@ namespace Vanara.PInvoke
/// the output string.
/// </para>
/// </param>
/// <param name="&#x9;&#x9;&#x9;&#x9;The BACKUP_SECURITY_INFORMATION &#x9;flag is not applicable to this function. If the BACKUP_SECURITY_INFORMATION &#x9;flag is passed in, the &amp;lt;i&amp;gt;SecurityInformation&amp;lt;/i&amp;gt; parameter returns TRUE with &amp;lt;b&amp;gt;null&amp;lt;/b&amp;gt; string output.&#xA;"/>
/// <param name="StringSecurityDescriptor">
/// <para>
/// A pointer to a variable that receives a pointer to a <c>null</c>-terminated security descriptor string. For a description of the

View File

@ -192,7 +192,7 @@ namespace Vanara.PInvoke
/// <summary>Initializes a new instance of the <see cref="SafeAllocatedSID"/> class.</summary>
private SafeAllocatedSID() : base() { }
/// <summary>Performs an implicit conversion from <see cref="SafeAllocatedSID"/> to <see cref="AllocatedSID"/>.</summary>
/// <summary>Performs an implicit conversion from <see cref="SafeAllocatedSID"/> to <see cref="PSID"/>.</summary>
/// <param name="h">The safe handle instance.</param>
/// <returns>The result of the conversion.</returns>
public static implicit operator PSID(SafeAllocatedSID h) => h.handle;

View File

@ -137,8 +137,7 @@ namespace Vanara.PInvoke
}
/// <summary>
/// Used by the <see
/// cref="ChangeServiceConfig(IntPtr,ServiceTypes,ServiceStartType,ServiceErrorControlType,string,string,IntPtr,char[],string,string,string)"/> function.
/// Used by the <see cref="ChangeServiceConfig(SC_HANDLE, ServiceTypes, ServiceStartType, ServiceErrorControlType, string, string, out uint, string, string, string, string)"/> function.
/// </summary>
public enum ServiceErrorControlType : uint
{
@ -165,8 +164,7 @@ namespace Vanara.PInvoke
}
/// <summary>
/// Used by the <see
/// cref="ChangeServiceConfig(IntPtr,ServiceTypes,ServiceStartType,ServiceErrorControlType,string,string,IntPtr,char[],string,string,string)"/> function.
/// Used by the <see cref="ChangeServiceConfig(IntPtr,ServiceTypes,ServiceStartType,ServiceErrorControlType,string,string,IntPtr,char[],string,string,string)"/> function.
/// </summary>
public enum ServiceStartType : uint
{
@ -190,8 +188,7 @@ namespace Vanara.PInvoke
}
/// <summary>
/// Used by the <see
/// cref="ChangeServiceConfig(IntPtr,ServiceTypes,ServiceStartType,ServiceErrorControlType,string,string,IntPtr,char[],string,string,string)"/> function.
/// Used by the <see cref="ChangeServiceConfig(IntPtr,ServiceTypes,ServiceStartType,ServiceErrorControlType,string,string,IntPtr,char[],string,string,string)"/> function.
/// </summary>
[Flags]
public enum ServiceTypes : uint

View File

@ -22,7 +22,7 @@ namespace Vanara.PInvoke
ACE_INHERITED_OBJECT_TYPE_PRESENT = 0x2
}
/// <summary>Used by the <see cref="GetAclInformation(IntPtr,ref ACL_REVISION_INFORMATION,uint,ACL_INFORMATION_CLASS)"/> function.</summary>
/// <summary>Used by the <see cref="GetAclInformation(PACL, ref ACL_SIZE_INFORMATION, uint, ACL_INFORMATION_CLASS)"/> function.</summary>
[PInvokeData("winnt.h")]
public enum ACL_INFORMATION_CLASS : uint
{

View File

@ -327,9 +327,7 @@ namespace Vanara.PInvoke
}
/// <summary>
/// Flags used in the <see cref="AuthzAccessCheck(AuthzAccessCheckFlags,SafeAUTHZ_CLIENT_CONTEXT_HANDLE,ref
/// AUTHZ_ACCESS_REQUEST,SafeAUTHZ_AUDIT_EVENT_HANDLE,SafeSecurityDescriptor,SECURITY_DESCRIPTOR[],uint,AUTHZ_ACCESS_REPLY,out
/// SafeAUTHZ_ACCESS_CHECK_RESULTS_HANDLE)"/> method.
/// Flags used in the <see cref="AuthzAccessCheck(AuthzAccessCheckFlags, AUTHZ_CLIENT_CONTEXT_HANDLE, in AUTHZ_ACCESS_REQUEST, AUTHZ_AUDIT_EVENT_HANDLE, PSECURITY_DESCRIPTOR, SECURITY_DESCRIPTOR[], uint, AUTHZ_ACCESS_REPLY, IntPtr)"/> method.
/// </summary>
[PInvokeData("authz.h")]
[Flags]

View File

@ -1828,7 +1828,7 @@ namespace Vanara.PInvoke
/// <summary>Base class for all native handles.</summary>
/// <seealso cref="Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid"/>
/// <seealso cref="System.IEquatable{Vanara.PInvoke.HANDLE}"/>
/// <seealso cref="System.IEquatable{T}"/>
/// <seealso cref="Vanara.PInvoke.IHandle"/>
public class HANDLE : SafeHandleZeroOrMinusOneIsInvalid, IEquatable<HANDLE>, IHandle
{
@ -1842,7 +1842,7 @@ namespace Vanara.PInvoke
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
protected HANDLE(IntPtr ptr, bool ownsHandle = true) : base(ownsHandle) => SetHandle(ptr);
protected HANDLE(IntPtr preexistingHandle, bool ownsHandle = true) : base(ownsHandle) => SetHandle(preexistingHandle);
/// <summary>Gets a value indicating whether this instance is null.</summary>
/// <value><c>true</c> if this instance is null; otherwise, <c>false</c>.</value>

View File

@ -14,18 +14,16 @@ namespace Vanara.InteropServices
{
private static readonly int ElemSize = Marshal.SizeOf(typeof(TElem));
/// <summary>Initializes a new instance of the <see cref="SafeNativeArray{TElem, TPrefix, TMem}"/> class.</summary>
/// <summary>Initializes a new instance of the <see cref="SafeNativeArray{TElem}"/> class.</summary>
public SafeNativeArray() : base(0) { }
/// <summary>
/// Initializes a new instance of the <see cref="SafeNativeArray{TElem, TPrefix, TMem}"/> class from a copy of a managed TElem array.
/// Initializes a new instance of the <see cref="SafeNativeArray{TElem}"/> class from a copy of a managed TElem array.
/// </summary>
/// <param name="array">The array of bytes to copy.</param>
/// <param name="getElemSize">Size of the get elem.</param>
public SafeNativeArray(TElem[] array) : base(IntPtr.Zero, 0, true) => Elements = array;
/// <summary>Initializes a new instance of the <see cref="SafeNativeArray{TElem, TPrefix, TMem}"/> class.</summary>
/// <param name="byteSize">Size of the byte.</param>
/// <summary>Initializes a new instance of the <see cref="SafeNativeArray{TElem}"/> class.</summary>
/// <param name="elementCount">The element count. This value can be 0.</param>
public SafeNativeArray(int elementCount) : base(GetRequiredSize(elementCount)) => Zero();
@ -35,7 +33,7 @@ namespace Vanara.InteropServices
/// <param name="ownsHandle">if set to <c>true</c> [owns handle].</param>
public SafeNativeArray(IntPtr ptr, int size, bool ownsHandle) : base(ptr, size, ownsHandle) { }
/// <summary>Gets the number of elements contained in the <see cref="SafeNativeArray{TElem, TPrefix, TMem}"/>.</summary>
/// <summary>Gets the number of elements contained in the <see cref="SafeNativeArray{TElem}"/>.</summary>
public int Count => IsInvalid ? 0 : BytesToCount(Size);
public bool IsReadOnly => false;

View File

@ -198,6 +198,8 @@ namespace Vanara.PInvoke
/// <summary>Initializes a new instance of the <see cref="SafeResourceId"/> class.</summary>
/// <param name="resName">Name of the resource.</param>
/// <param name="charSet">The character set.</param>
/// <exception cref="System.ArgumentNullException">resName</exception>
public SafeResourceId(string resName, CharSet charSet = CharSet.Auto)
{
if (string.IsNullOrEmpty(resName)) throw new ArgumentNullException(nameof(resName));

View File

@ -1,6 +1,6 @@
namespace Vanara.PInvoke
{
/// <summary>Color index used to get a system color from <see cref="GetSysColor"/>.</summary>
/// <summary>Color index used to get a system color from <c>GetSysColor</c>.</summary>
[PInvokeData("WinUser.h", MSDNShortId = "ms724371")]
public enum SystemColorIndex
{

View File

@ -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);
/// <summary>Requests an image from an object, such as an item in a Shell folder.</summary>
/// <param name="phBmpImage">The HBITMAP of the image.</param>
/// <returns>The HBITMAP of the image.</returns>
HBITMAP Extract();
}
}

View File

@ -253,16 +253,22 @@ namespace Vanara.PInvoke
/// </summary>
NIIF_LARGE_ICON = 0x00000020,
/// <summary> 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. <paraBecause 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.></para> <para>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.</para> <para>If the current user is not in
/// quiet time, this flag has no effect.</para> </summary>
/// <summary>
/// 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.
/// <para>
/// 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.&gt;
/// </para>
/// <para>
/// 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.
/// </para>
/// <para>If the current user is not in quiet time, this flag has no effect.</para>
/// </summary>
NIIF_RESPECT_QUIET_TIME = 0x00000080
}
@ -3443,7 +3449,7 @@ namespace Vanara.PInvoke
/// <summary>
/// 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 <see cref="BalloonIconStyle">RMUtils.WinAPI.Structs.BalloonIconStyle</see> for more information.
/// is not shown.
/// </summary>
public NIIF dwInfoFlags;

View File

@ -197,13 +197,13 @@ namespace Vanara.PInvoke
[Flags]
public enum GPFIDL_FLAGS
{
/// <summary>Win32 file names, servers, and root drives are included.</para>
/// <summary>Win32 file names, servers, and root drives are included.</summary>
GPFIDL_DEFAULT = 0x0000,
/// <summary>Uses short file names.</para>
/// <summary>Uses short file names.</summary>
GPFIDL_ALTNAME = 0x0001,
/// <summary>Include UNC printer names items.</para>
/// <summary>Include UNC printer names items.</summary>
GPFIDL_UNCPRINTER = 0x0002,
}
@ -6426,8 +6426,8 @@ namespace Vanara.PInvoke
/// <summary> 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>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>
/// </summary>
public uint cKeys;

View File

@ -413,7 +413,7 @@ namespace Vanara.PInvoke
/// to a Shell verb such as open. Set this parameter to NULL if it is not used.
/// </param>
/// <param name="phkeyOut">A pointer to the key's HKEY value.</param>
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);
/// <summary>Searches for and retrieves file or protocol association-related binary data from the registry.</summary>
/// <param name="flags">The ASSOCF value that can be used to control the search.</param>

View File

@ -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);
/// <summary>
/// <para>Determines whether a given file name has one of a list of suffixes.</para>

View File

@ -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);
/// <summary>
/// <para>Converts a numeric value into a string that represents the number expressed as a size value in kilobytes.</para>
@ -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.
/// </para>
/// </param>
/// <param name="(optional white space)(optional sign)(one or more decimal digits)">
/// <para>The optional sign can be the character '-' or '+'; if omitted, the sign is assumed to be positive.</para>
/// </param>
/// <returns>

View File

@ -138,9 +138,11 @@ namespace Vanara.PInvoke
/// </summary>
URL_UNESCAPE = 0x10000000,
/// <summary> 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. </summary>
/// <summary>
/// Replace unsafe characters with their escape sequences. Unsafe characters are those characters that may be altered
/// during transport across the Internet, and include the (&lt;, &gt;, ", #, {, }, |, , ^, [, ], and ') characters. This flag applies
/// to all URLs, including opaque URLs.
/// </summary>
URL_ESCAPE_UNSAFE = 0x20000000,
/// <summary>

View File

@ -347,9 +347,11 @@ namespace Vanara.PInvoke
/// <summary>The program is running as a Terminal Server client. Equivalent to GetSystemMetrics(SM_REMOTESESSION).</summary>
OS_TERMINALCLIENT = 14,
/// <summary>The program is running on Windows 2000 Terminal Server in the Remote Administration mode or Windows Server 2003 (or
/// <summary>
/// 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.</summary>
/// equivalent to VER_SUITE_TERMINAL &amp;&amp; VER_SUITE_SINGLEUSERTS.
/// </summary>
OS_TERMINALREMOTEADMIN = 15,
/// <summary>Always returns FALSE.</summary>
@ -365,15 +367,15 @@ namespace Vanara.PInvoke
OS_HOME = 19,
/// <summary>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.</summary>
/// to VER_PLATFORM_WIN32_NT &amp;&amp; VER_NT_WORKSTATION.</summary>
OS_PROFESSIONAL = 20,
/// <summary>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.</summary>
/// (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) &amp;&amp; VER_SUITE_DATACENTER.</summary>
OS_DATACENTER = 21,
/// <summary>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.</summary>
/// (VER_NT_SERVER || VER_NT_DOMAIN_CONTROLLER) &amp;&amp; VER_SUITE_ENTERPRISE &amp;&amp; !VER_SUITE_DATACENTER.</summary>
OS_ADVSERVER = 22,
/// <summary>
@ -383,11 +385,11 @@ namespace Vanara.PInvoke
OS_SERVER = 23,
/// <summary>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.</summary>
/// of its successors) in Terminal Server mode. This is equivalent to VER_SUITE_TERMINAL &amp;&amp; VER_SUITE_SINGLEUSERTS.</summary>
OS_TERMINALSERVER = 24,
/// <summary>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.</summary>
/// VER_SUITE_SINGLEUSERTS &amp;&amp; !VER_SUITE_TERMINAL.</summary>
OS_PERSONALTERMINALSERVER = 25,
/// <summary>Fast user switching is enabled.</summary>

View File

@ -819,16 +819,13 @@ namespace Vanara.PInvoke
/// <para>Retrieves the next specified number of tasks in the enumeration sequence.</para>
/// <para>If there are fewer than the requested number of tasks left in the sequence, all the remaining elements are retrieved.</para>
/// </summary>
/// <param name="celt">
/// <para>The number of tasks to retrieve.</para>
/// </param>
/// <param name="enumItems">The <see cref="IEnumWorkItems"/> instance on which to act.</param>
/// <param name="celt">The number of tasks to retrieve.</param>
/// <param name="names">
/// 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.
/// </param>
/// <param name="pceltFetched">
/// <para>The number of tasks returned in rgpwszNames.</para>
/// </param>
/// <param name="pceltFetched">The number of tasks returned in rgpwszNames.</param>
/// <returns>
/// <para>Returns one of the following values.</para>
/// <list type="table">

View File

@ -271,7 +271,7 @@ namespace Vanara.PInvoke
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to an <see cref="NMCOMBOBOXEX"/> structure containing information about the notification code and the item that was inserted.
/// A pointer to an <c>NMCOMBOBOXEX</c> structure containing information about the notification code and the item that was inserted.
/// </description>
/// </item>
/// </list>
@ -284,7 +284,7 @@ namespace Vanara.PInvoke
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to an <see cref="NMCOMBOBOXEX"/> structure that contains information about the notification code and the deleted item.
/// A pointer to an <c>NMCOMBOBOXEX</c> structure that contains information about the notification code and the deleted item.
/// </description>
/// </item>
/// </list>
@ -312,7 +312,7 @@ namespace Vanara.PInvoke
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to an <see cref="NMCBEENDEDIT"/> structure that contains information about how the user concluded the edit operation.
/// A pointer to an <c>NMCBEENDEDIT</c> structure that contains information about how the user concluded the edit operation.
/// </description>
/// </item>
/// </list>
@ -326,7 +326,7 @@ namespace Vanara.PInvoke
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to an <see cref="NMCBEENDEDIT"/> structure that contains information about how the user concluded the edit operation.
/// A pointer to an <c>NMCBEENDEDIT</c> structure that contains information about how the user concluded the edit operation.
/// </description>
/// </item>
/// </list>
@ -339,7 +339,7 @@ namespace Vanara.PInvoke
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to an <see cref="NMCOMBOBOXEX"/> structure that contains information about the notification code.
/// A pointer to an <c>NMCOMBOBOXEX</c> structure that contains information about the notification code.
/// </description>
/// </item>
/// </list>
@ -353,7 +353,7 @@ namespace Vanara.PInvoke
/// <item>
/// <term>lParam</term>
/// <description>
/// A pointer to a <see cref="NMCBEDRAGBEGIN"/> structure that contains information about the notification code.
/// A pointer to a <c>NMCBEDRAGBEGIN</c> structure that contains information about the notification code.
/// </description>
/// </item>
/// </list>

View File

@ -715,7 +715,7 @@ namespace Vanara.PInvoke
TPM_WORKAREA = 0x10000,
}
/// <summary>Flags for <see cref="UpdateLayeredWindow"/></summary>
/// <summary>Flags for <see cref="UpdateLayeredWindow(HWND, HDC, in Point, in SIZE, HDC, in Point, COLORREF, in Gdi32.BLENDFUNCTION, UpdateLayeredWindowFlags)"/></summary>
[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);
/// <summary>
/// <para>Minimizes (but does not destroy) the specified window.</para>
@ -2841,7 +2841,7 @@ namespace Vanara.PInvoke
/// </remarks>
// 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);
/// <summary>
/// <para>Retrieves a handle to the specified window's parent or owner.</para>
@ -3343,8 +3343,8 @@ namespace Vanara.PInvoke
/// <param name="pString">
/// <para>Type: <c>LPWSTR</c></para>
/// <para>The buffer that is to receive the text.</para>
/// <para>If the string is as long or longer than the buffer, the string is truncated and terminated with a null character.</para>
/// </param>
/// <param name="&#x9;&#x9;&#x9;If the&#xA;&#x9;&#x9;&#x9;string is as long or longer than the buffer, the string is truncated and&#xA;&#x9;&#x9;&#x9;terminated with a null character.&#xA;"/>
/// <param name="cchMaxCount">
/// <para>Type: <c>int</c></para>
/// <para>
@ -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.
/// </para>
/// </remarks>
// 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.
/// </para>
/// <para>Set this value to WDA_NONE to remove the monitor-only affinity.</para>
/// </param>
/// <param name="&#x9;&#x9;&#x9;Set this value to WDA_NONE to remove the monitor-only affinity.&#xA;"/>
/// <returns>
/// <para>Type: <c>Type: <c>BOOL</c></c></para>
/// <para>

View File

@ -212,7 +212,7 @@ namespace Vanara.PInvoke
WM_VSCROLLCLIPBOARD = 0x030A,
}
/// <summary><para>The clipboard formats defined by the system are called standard clipboard formats.</summary>
/// <summary>The clipboard formats defined by the system are called standard clipboard formats.</summary>
// 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

View File

@ -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);
/// <summary>
/// <para>Removes a hook procedure installed in a hook chain by the SetWindowsHookEx function.</para>

View File

@ -613,6 +613,7 @@ namespace Vanara.PInvoke
/// <summary>Initializes a new instance of the <see cref="SafeHANIMATIONBUFFER"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="updateTargetDC">The value to pass <see cref="EndBufferedAnimation"/> when closing this handle.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>
@ -637,6 +638,7 @@ namespace Vanara.PInvoke
/// <summary>Initializes a new instance of the <see cref="SafeHPAINTBUFFER"/> class and assigns an existing handle.</summary>
/// <param name="preexistingHandle">An <see cref="IntPtr"/> object that represents the pre-existing handle to use.</param>
/// <param name="updateTargetDC">The value to pass <see cref="EndBufferedPaint"/> when closing this handle.</param>
/// <param name="ownsHandle">
/// <see langword="true"/> to reliably release the handle during the finalization phase; otherwise, <see langword="false"/> (not recommended).
/// </param>

View File

@ -1773,7 +1773,7 @@ namespace Vanara.PInvoke
public static implicit operator SafeInternetConnectHandle(IntPtr hInternet) => new SafeInternetConnectHandle(hInternet);
}
/// <summary>Provides a <see cref="SafeHandle"/> for <see cref="InternetHandle"/> that is disposed using <see cref="InternetCloseHandle"/>.</summary>
/// <summary>Provides a <see cref="SafeHandle"/> that is disposed using <see cref="InternetCloseHandle"/>.</summary>
public class SafeInternetHandle : HANDLE
{
/// <summary>Initializes a new instance of the <see cref="SafeInternetHandle"/> class and assigns an existing handle.</summary>

View File

@ -101,7 +101,7 @@ namespace Vanara.IO
return new Enumerator(ienum);
}
/// <summary> Removes the first occurrence of a specific object from the <see cref=""ICollection{T}" />. </summary> <param name="item">The object to
/// <summary> Removes the first occurrence of a specific object from the <see cref="ICollection{T}" />. </summary> <param name="item">The object to
/// remove from the <see cref=""ICollection{T}" />.</param> <returns> true if <paramref name="item" /> was successfully removed from the <see
/// cref=""ICollection{T}" />; otherwise, false. This method also returns false if <paramref name="item" /> is not found in the original <see
/// cref=""ICollection{T}" />. </returns> <exception cref="ArgumentNullException">item</exception>

View File

@ -7,7 +7,7 @@ using static Vanara.PInvoke.BITS;
namespace Vanara.IO
{
/// <summary>Represents a single BITS job credential.</summary>
/// <seealso cref="System.IComparable{Vanara.IO.BackgroundCopyJobCredential}"/>
/// <seealso cref="System.IComparable{T}"/>
public class BackgroundCopyJobCredential : IComparable<BackgroundCopyJobCredential>
{
/// <summary>Initializes a new instance of the <see cref="BackgroundCopyJobCredential"/> class.</summary>
@ -54,7 +54,7 @@ namespace Vanara.IO
/// <summary>The list of credentials for a job.</summary>
/// <seealso cref="System.IDisposable"/>
/// <seealso cref="System.Collections.Generic.ICollection{Vanara.IO.BackgroundCopyJobCredential}"/>
/// <seealso cref="System.Collections.Generic.ICollection{T}"/>
public class BackgroundCopyJobCredentials : IDisposable, ICollection<BackgroundCopyJobCredential>
{
private Dictionary<uint, BackgroundCopyJobCredential> dict;

View File

@ -27,7 +27,8 @@ namespace Vanara.Network
/// <summary>Gets the length of the list.</summary>
int Length { get; }
/// <summary>Gets the <see cref="T"/> with the specified identifier.</summary>
/// <summary>Gets the with the specified identifier.</summary>
/// <value>The found item type.</value>
/// <param name="id">The identifier.</param>
/// <returns>The item found by the identifier.</returns>
T this[TLookup id] { get; }

View File

@ -39,7 +39,7 @@ namespace Vanara.IO
/// </summary>
/// <param name="pszPath">The path string. This value should not be <see langword="null"/>.</param>
/// <returns>The path string with the appended backslash.</returns>
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);
/// <summary>
/// Adds a file name extension to a path string.

View File

@ -290,8 +290,6 @@ namespace Vanara.Windows.Forms
/// <summary>Gets the live client thumbnail.</summary>
/// <param name="window">The window.</param>
/// <param name="visible">if set to <c>true</c> [visible].</param>
/// <param name="destinationRect"></param>
/// <returns></returns>
public static LiveThumbnail GetLiveClientThumbnail(this IWin32Window window) => new LiveThumbnail(window);

View File

@ -21,7 +21,7 @@ namespace Vanara.Windows.Forms
/// <summary>
/// Do not display a progress bar. Typically, an application can quantitatively determine how much of the operation remains and
/// periodically pass that value to <see cref="UpdateProgress(ulong, ulong)"/>. The progress dialog box uses this information to
/// periodically pass that value to <c>UpdateProgress</c>. 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.
/// </summary>
@ -70,7 +70,7 @@ namespace Vanara.Windows.Forms
iDlg = new IProgressDialog();
}
/// <summary> Gets or sets a value indicating whether to automatically estimate the remaining time and display it.</summary> </summary>
/// <summary> Gets or sets a value indicating whether to automatically estimate the remaining time and display it.</summary>
[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
/// <summary>Starts the progress dialog box.</summary>
/// <param name="hwndParent">The progress dialog box's parent window. This value can be <see langword="null"/>.</param>
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);
}

View File

@ -38,7 +38,7 @@ using static Vanara.PInvoke.User32_Gdi;
namespace Vanara.Extensions
{
/// <summary>Used to determine the size of the icon returned by <see cref="ShellImageList.GetSystemIcon"/>.</summary>
/// <summary>Used to determine the size of the icon returned by various shell methods.</summary>
public enum IconSize
{
/// <summary>
@ -108,11 +108,11 @@ namespace Vanara.Extensions
/// <param name="pidl">The ITEMIDLIST pointer from which to retrieve the icon.</param>
/// <param name="iconSize">Size of the icon.</param>
/// <returns>Icon of the specified size, or <c>null</c> if no icon is associated with this ITEMIDLIST.</returns>
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
/// <summary>Gets the Shell icon for the given file name or extension.</summary>
/// <param name="fileNameOrExtension">The file name or extension .</param>
/// <param name="iconType">Flags to specify the type of the icon to retrieve. This uses the <see cref="SHGetFileInfo"/> method and can only retrieve small or large icons.</param>
/// <param name="iconType">Flags to specify the type of the icon to retrieve. This uses the <see cref="SHGetFileInfo(string, FileAttributes, ref SHFILEINFO, int, SHGFI)"/> method and can only retrieve small or large icons.</param>
/// <returns>An <see cref="Icon"/> instance if found; otherwise <see langword="null"/>.</returns>
public static Icon GetFileIcon(string fileNameOrExtension, IconSize iconType = IconSize.Large)
{

View File

@ -39,157 +39,42 @@ namespace Vanara.Windows.Shell
}
/// <summary>Performs caller-implemented actions after the last operation performed by the call to IFileOperation is complete.</summary>
/// <param name="hrResult">
/// 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.
/// </param>
public event EventHandler<ShellFileOpEventArgs> FinishOperations;
/// <summary>Performs caller-implemented actions after the copy process for each item is complete.</summary>
/// <param name="dwFlags">
/// 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.
/// </param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the source item.</param>
/// <param name="psiDestinationFolder">Pointer to an IShellItem that specifies the destination folder to which the item was copied.</param>
/// <param name="pszNewName">
/// 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.
/// </param>
/// <param name="hrCopy">
/// 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.
/// </param>
/// <param name="psiNewlyCreated">Pointer to an IShellItem that represents the new copy of the item.</param>
public event EventHandler<ShellFileOpEventArgs> PostCopyItem;
/// <summary>Performs caller-implemented actions after the delete process for each item is complete.</summary>
/// <param name="dwFlags">
/// 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.
/// </param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the item that was deleted.</param>
/// <param name="hrDelete">
/// 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.
/// </param>
/// <param name="psiNewlyCreated">
/// 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.
/// </param>
public event EventHandler<ShellFileOpEventArgs> PostDeleteItem;
/// <summary>Performs caller-implemented actions after the move process for each item is complete.</summary>
/// <param name="dwFlags">
/// 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.
/// </param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the source item.</param>
/// <param name="psiDestinationFolder">Pointer to an IShellItem that specifies the destination folder that contains the moved item.</param>
/// <param name="pszNewName">
/// 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.
/// </param>
/// <param name="hrMove">
/// 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.
/// </param>
/// <param name="psiNewlyCreated">Pointer to an IShellItem that represents the moved item in its new location.</param>
public event EventHandler<ShellFileOpEventArgs> PostMoveItem;
/// <summary>Performs caller-implemented actions after the new item is created.</summary>
/// <param name="dwFlags">
/// 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.
/// </param>
/// <param name="psiDestinationFolder">Pointer to an IShellItem that specifies the destination folder to which the new item was added.</param>
/// <param name="pszNewName">Pointer to the file name of the new item, for instance Newfile.txt. This is a null-terminated, Unicode string.</param>
/// <param name="pszTemplateName">
/// 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:
/// <list type="bullet">
/// <item>
/// <description>CSIDL_COMMON_TEMPLATES. The default path for this folder is %ALLUSERSPROFILE%\Templates.</description>
/// </item>
/// <item>
/// <description>CSIDL_TEMPLATES. The default path for this folder is %USERPROFILE%\Templates.</description>
/// </item>
/// <item>
/// <description>%SystemRoot%\shellnew</description>
/// </item>
/// </list>
/// <para>
/// 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.
/// </para>
/// <para>This parameter is normally NULL to specify a new, blank file.</para>
/// </param>
/// <param name="dwFileAttributes">The file attributes applied to the new item. One or more of the values found at GetFileAttributes.</param>
/// <param name="hrNew">
/// 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.
/// </param>
/// <param name="psiNewItem">Pointer to an IShellItem that represents the new item.</param>
public event EventHandler<ShellFileNewOpEventArgs> PostNewItem;
/// <summary>Performs caller-implemented actions after the rename process for each item is complete.</summary>
/// <param name="dwFlags">
/// 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.
/// </param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the item before it was renamed.</param>
/// <param name="pszNewName">
/// 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.
/// </param>
/// <param name="hrRename">
/// 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.
/// </param>
/// <param name="psiNewlyCreated">Pointer to an IShellItem that represents the item with its new name.</param>
public event EventHandler<ShellFileOpEventArgs> PostRenameItem;
/// <summary>Performs caller-implemented actions before the copy process for each item begins.</summary>
/// <param name="dwFlags">bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions.</param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the source item.</param>
/// <param name="psiDestinationFolder">Pointer to an IShellItem that specifies the destination folder to contain the copy of the item.</param>
/// <param name="pszNewName">
/// 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.
/// </param>
public event EventHandler<ShellFileOpEventArgs> PreCopyItem;
/// <summary>Performs caller-implemented actions before the delete process for each item begins.</summary>
/// <param name="dwFlags">bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions.</param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the item to be deleted.</param>
public event EventHandler<ShellFileOpEventArgs> PreDeleteItem;
/// <summary>Performs caller-implemented actions before the move process for each item begins.</summary>
/// <param name="dwFlags">bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions.</param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the item to be moved.</param>
/// <param name="psiDestinationFolder">Pointer to an IShellItem that specifies the destination folder to contain the moved item.</param>
/// <param name="pszNewName">
/// 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.
/// </param>
public event EventHandler<ShellFileOpEventArgs> PreMoveItem;
/// <summary>Performs caller-implemented actions before the process to create a new item begins.</summary>
/// <param name="dwFlags">bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions.</param>
/// <param name="psiDestinationFolder">Pointer to an IShellItem that specifies the destination folder that will contain the new item.</param>
/// <param name="pszNewName">Pointer to the file name of the new item, for instance Newfile.txt. This is a null-terminated, Unicode string.</param>
public event EventHandler<ShellFileOpEventArgs> PreNewItem;
/// <summary>Performs caller-implemented actions before the rename process for each item begins.</summary>
/// <param name="dwFlags">bitwise value that contains flags that control the operation. See TRANSFER_SOURCE_FLAGS for flag descriptions.</param>
/// <param name="psiItem">Pointer to an IShellItem that specifies the item to be renamed.</param>
/// <param name="pszNewName">Pointer to the new display name of the item. This is a null-terminated, Unicode string.</param>
public event EventHandler<ShellFileOpEventArgs> PreRenameItem;
/// <summary>Performs caller-implemented actions before any specific file operations are performed.</summary>
public event EventHandler StartOperations;
/// <summary>Updates the progress.</summary>
/// <param name="iWorkTotal">The i work total.</param>
/// <param name="iWorkSoFar">The i work so far.</param>
public event System.ComponentModel.ProgressChangedEventHandler UpdateProgress;
/// <summary>Flags that control the file operation.</summary>

View File

@ -46,7 +46,7 @@ namespace Vanara.Windows.Shell
/// <summary>Gets the Shell icon for the given file name or extension.</summary>
/// <param name="fileNameOrExtension">The file name or extension .</param>
/// <param name="iconType">Flags to specify the type of the icon to retrieve. This uses the <see cref="SHGetFileInfo"/> method and can only retrieve small or large icons.</param>
/// <param name="iconType">Flags to specify the type of the icon to retrieve. This uses the <see cref="SHGetFileInfo(string, System.IO.FileAttributes, ref SHFILEINFO, int, SHGFI)"/> method and can only retrieve small or large icons.</param>
/// <returns>An <see cref="Icon"/> instance if found; otherwise <see langword="null"/>.</returns>
public static Icon GetFileIcon(string fileNameOrExtension, ShellIconType iconType = ShellIconType.Large)
{

View File

@ -432,7 +432,6 @@ namespace Vanara.Windows.Shell
public bool IsFolder => iShellItem.GetAttributes(SFGAO.SFGAO_FOLDER) != 0;
/// <summary>Gets the IShellItem instance of the current ShellItem.</summary>
/// <param name="i">A ShellItem instance.</param>
public IShellItem IShellItem => iShellItem;
/// <summary>Gets a value indicating whether this instance is link.</summary>