diff --git a/PInvoke/Shell32/ShlObj.cs b/PInvoke/Shell32/ShlObj.cs
index 7647f4b6..896e878e 100644
--- a/PInvoke/Shell32/ShlObj.cs
+++ b/PInvoke/Shell32/ShlObj.cs
@@ -16,23 +16,23 @@ namespace Vanara.PInvoke
[SuppressUnmanagedCodeSecurity]
public static partial class Shell32
{
- // Defined in wingdi.h
- private const int LF_FACESIZE = 32;
-
- /// The overlay icon that indicates a shared folder.
- public const int IDO_SHGIOI_SHARE = 0x0FFFFFFF;
-
- /// The overlay icon that indicates a linked folder or file.
- public const int IDO_SHGIOI_LINK = 0x0FFFFFFE;
-
- /// The overlay icon that indicates a slow file.
- public const int IDO_SHGIOI_SLOWFILE = 0x0FFFFFFD;
-
///
/// Windows 7 and later. The overlay icon that indicates that the item is the default in a set. One example is the default printer.
///
public const int IDO_SHGIOI_DEFAULT = 0x0FFFFFFC;
+ /// The overlay icon that indicates a linked folder or file.
+ public const int IDO_SHGIOI_LINK = 0x0FFFFFFE;
+
+ /// The overlay icon that indicates a shared folder.
+ public const int IDO_SHGIOI_SHARE = 0x0FFFFFFF;
+
+ /// The overlay icon that indicates a slow file.
+ public const int IDO_SHGIOI_SLOWFILE = 0x0FFFFFFD;
+
+ // Defined in wingdi.h
+ private const int LF_FACESIZE = 32;
+
///
///
/// [ LPFNDFMCALLBACK is available for use in the operating systems specified in the Requirements section. It may be altered
@@ -164,6 +164,298 @@ namespace Vanara.PInvoke
CLOSEPROPS_DISCARD = 0x0001
}
+ ///
+ /// CSIDL (constant special item ID list) values provide a unique system-independent way to identify special folders used frequently
+ /// by applications, but which may not have the same name or location on any given system. For example, the system folder may be
+ /// "C:\Windows" on one system and "C:\Winnt" on another. These constants are defined in Shlobj.h.
+ ///
+ [PInvokeData("Shlobj.h", MSDNShortId = "bb762494")]
+ public enum CSIDL
+ {
+ /// The virtual folder that represents the Windows desktop, the root of the namespace.
+ CSIDL_DESKTOP = 0x0000,
+
+ /// A virtual folder for Internet Explorer.
+ CSIDL_INTERNET = 0x0001,
+
+ ///
+ /// The file system directory that contains the user's program groups (which are themselves file system directories). A typical
+ /// path is C:\Documents and Settings\username\Start Menu\Programs.
+ ///
+ CSIDL_PROGRAMS = 0x0002,
+
+ /// The virtual folder that contains icons for the Control Panel applications.
+ CSIDL_CONTROLS = 0x0003,
+
+ /// The virtual folder that contains installed printers.
+ CSIDL_PRINTERS = 0x0004,
+
+ ///
+ /// Version 6.0. The virtual folder that represents the My Documents desktop item. This is equivalent to CSIDL_MYDOCUMENTS.
+ ///
+ /// Previous to Version 6.0. The file system directory used to physically store a user's common repository of documents. A
+ /// typical path is C:\Documents and Settings\username\My Documents. This should be distinguished from the virtual My Documents
+ /// folder in the namespace. To access that virtual folder, use SHGetFolderLocation, which returns the ITEMIDLIST for the virtual
+ /// location, or refer to the technique described in Managing the File System.
+ ///
+ ///
+ CSIDL_PERSONAL = 0x0005,
+
+ ///
+ /// The file system directory that serves as a common repository for the user's favorite items. A typical path is C:\Documents
+ /// and Settings\username\Favorites.
+ ///
+ CSIDL_FAVORITES = 0x0006,
+
+ ///
+ /// The file system directory that corresponds to the user's Startup program group. The system starts these programs whenever the
+ /// associated user logs on. A typical path is C:\Documents and Settings\username\Start Menu\Programs\Startup.
+ ///
+ CSIDL_STARTUP = 0x0007,
+
+ ///
+ /// The file system directory that contains shortcuts to the user's most recently used documents. A typical path is C:\Documents
+ /// and Settings\username\My Recent Documents. To create a shortcut in this folder, use SHAddToRecentDocs. In addition to
+ /// creating the shortcut, this function updates the Shell's list of recent documents and adds the shortcut to the My Recent
+ /// Documents submenu of the Start menu.
+ ///
+ CSIDL_RECENT = 0x0008,
+
+ /// The file system directory that contains Send To menu items. A typical path is C:\Documents and Settings\username\SendTo.
+ CSIDL_SENDTO = 0x0009,
+
+ /// The virtual folder that contains the objects in the user's Recycle Bin.
+ CSIDL_BITBUCKET = 0x000a,
+
+ ///
+ /// The file system directory that contains Start menu items. A typical path is C:\Documents and Settings\username\Start Menu.
+ ///
+ CSIDL_STARTMENU = 0x000b,
+
+ /// Version 6.0. The virtual folder that represents the My Documents desktop item. This value is equivalent to CSIDL_PERSONAL.
+ CSIDL_MYDOCUMENTS = CSIDL_PERSONAL,
+
+ ///
+ /// The file system directory that serves as a common repository for music files. A typical path is C:\Documents and
+ /// Settings\User\My Documents\My Music.
+ ///
+ CSIDL_MYMUSIC = 0x000d,
+
+ ///
+ /// Version 6.0. The file system directory that serves as a common repository for video files. A typical path is C:\Documents and
+ /// Settings\username\My Documents\My Videos.
+ ///
+ CSIDL_MYVIDEO = 0x000e,
+
+ ///
+ /// The file system directory used to physically store file objects on the desktop (not to be confused with the desktop folder
+ /// itself). A typical path is C:\Documents and Settings\username\Desktop.
+ ///
+ CSIDL_DESKTOPDIRECTORY = 0x0010,
+
+ ///
+ /// The virtual folder that represents My Computer, containing everything on the local computer: storage devices, printers, and
+ /// Control Panel. The folder can also contain mapped network drives.
+ ///
+ CSIDL_DRIVES = 0x0011,
+
+ /// A virtual folder that represents Network Neighborhood, the root of the network namespace hierarchy.
+ CSIDL_NETWORK = 0x0012,
+
+ ///
+ /// A file system directory that contains the link objects that may exist in the My Network Places virtual folder. It is not the
+ /// same as CSIDL_NETWORK, which represents the network namespace root. A typical path is C:\Documents and Settings\username\NetHood.
+ ///
+ CSIDL_NETHOOD = 0x0013,
+
+ /// A virtual folder that contains fonts. A typical path is C:\Windows\Fonts.
+ CSIDL_FONTS = 0x0014,
+
+ ///
+ /// The file system directory that serves as a common repository for document templates. A typical path is C:\Documents and Settings\username\Templates.
+ ///
+ CSIDL_TEMPLATES = 0x0015,
+
+ ///
+ /// The file system directory that contains the programs and folders that appear on the Start menu for all users. A typical path
+ /// is C:\Documents and Settings\All Users\Start Menu.
+ ///
+ CSIDL_COMMON_STARTMENU = 0x0016,
+
+ ///
+ /// The file system directory that contains the directories for the common program groups that appear on the Start menu for all
+ /// users. A typical path is C:\Documents and Settings\All Users\Start Menu\Programs.
+ ///
+ CSIDL_COMMON_PROGRAMS = 0X0017,
+
+ ///
+ /// The file system directory that contains the programs that appear in the Startup folder for all users. A typical path is
+ /// C:\Documents and Settings\All Users\Start Menu\Programs\Startup.
+ ///
+ CSIDL_COMMON_STARTUP = 0x0018,
+
+ ///
+ /// The file system directory that contains files and folders that appear on the desktop for all users. A typical path is
+ /// C:\Documents and Settings\All Users\Desktop.
+ ///
+ CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019,
+
+ ///
+ /// Version 4.71. The file system directory that serves as a common repository for application-specific data. A typical path is
+ /// C:\Documents and Settings\username\Application Data.
+ ///
+ CSIDL_APPDATA = 0x001a,
+
+ ///
+ /// The file system directory that contains the link objects that can exist in the Printers virtual folder. A typical path is
+ /// C:\Documents and Settings\username\PrintHood.
+ ///
+ CSIDL_PRINTHOOD = 0x001b,
+
+ ///
+ /// Version 5.0. The file system directory that serves as a data repository for local (nonroaming) applications. A typical path
+ /// is C:\Documents and Settings\username\Local Settings\Application Data.
+ ///
+ CSIDL_LOCAL_APPDATA = 0x001c,
+
+ ///
+ /// The file system directory that corresponds to the user's nonlocalized Startup program group. This value is recognized in
+ /// Windows Vista for backward compatibility, but the folder itself no longer exists.
+ ///
+ CSIDL_ALTSTARTUP = 0x001d,
+
+ ///
+ /// The file system directory that corresponds to the nonlocalized Startup program group for all users. This value is recognized
+ /// in Windows Vista for backward compatibility, but the folder itself no longer exists.
+ ///
+ CSIDL_COMMON_ALTSTARTUP = 0x001e,
+
+ /// The file system directory that serves as a common repository for favorite items common to all users.
+ CSIDL_COMMON_FAVORITES = 0x001f,
+
+ ///
+ /// Version 4.72. The file system directory that serves as a common repository for temporary Internet files. A typical path is
+ /// C:\Documents and Settings\username\Local Settings\Temporary Internet Files.
+ ///
+ CSIDL_INTERNET_CACHE = 0x0020,
+
+ ///
+ /// The file system directory that serves as a common repository for Internet cookies. A typical path is C:\Documents and Settings\username\Cookies.
+ ///
+ CSIDL_COOKIES = 0x0021,
+
+ /// The file system directory that serves as a common repository for Internet history items.
+ CSIDL_HISTORY = 0x0022,
+
+ ///
+ /// Version 5.0. The file system directory that contains application data for all users. A typical path is C:\Documents and
+ /// Settings\All Users\Application Data. This folder is used for application data that is not user specific. For example, an
+ /// application can store a spell-check dictionary, a database of clip art, or a log file in the CSIDL_COMMON_APPDATA folder.
+ /// This information will not roam and is available to anyone using the computer.
+ ///
+ CSIDL_COMMON_APPDATA = 0x0023,
+
+ ///
+ /// Version 5.0. The Windows directory or SYSROOT. This corresponds to the %windir% or %SYSTEMROOT% environment variables. A
+ /// typical path is C:\Windows.
+ ///
+ CSIDL_WINDOWS = 0x0024,
+
+ /// Version 5.0. The Windows System folder. A typical path is C:\Windows\System32.
+ CSIDL_SYSTEM = 0x0025,
+
+ /// Version 5.0. The Program Files folder. A typical path is C:\Program Files.
+ CSIDL_PROGRAM_FILES = 0x0026,
+
+ ///
+ /// Version 5.0. The file system directory that serves as a common repository for image files. A typical path is C:\Documents and
+ /// Settings\username\My Documents\My Pictures.
+ ///
+ CSIDL_MYPICTURES = 0x0027,
+
+ ///
+ /// Version 5.0. The user's profile folder. A typical path is C:\Users\username. Applications should not create files or folders
+ /// at this level; they should put their data under the locations referred to by CSIDL_APPDATA or CSIDL_LOCAL_APPDATA. However,
+ /// if you are creating a new Known Folder the profile root referred to by CSIDL_PROFILE is appropriate.
+ ///
+ CSIDL_PROFILE = 0x0028,
+
+ ///
+ CSIDL_SYSTEMX86 = 0x0029,
+
+ ///
+ CSIDL_PROGRAM_FILESX86 = 0x002a,
+
+ ///
+ /// Version 5.0. A folder for components that are shared across applications. A typical path is C:\Program Files\Common. Valid
+ /// only for Windows XP.
+ ///
+ CSIDL_PROGRAM_FILES_COMMON = 0x002b,
+
+ ///
+ CSIDL_PROGRAM_FILES_COMMONX86 = 0x002c,
+
+ ///
+ /// The file system directory that contains the templates that are available to all users. A typical path is C:\Documents and
+ /// Settings\All Users\Templates.
+ ///
+ CSIDL_COMMON_TEMPLATES = 0x002d,
+
+ ///
+ /// The file system directory that contains documents that are common to all users. A typical path is C:\Documents and
+ /// Settings\All Users\Documents.
+ ///
+ CSIDL_COMMON_DOCUMENTS = 0x002e,
+
+ /// Version 5.0. The file system directory that contains administrative tools for all users of the computer.
+ CSIDL_COMMON_ADMINTOOLS = 0x002f,
+
+ ///
+ /// Version 5.0. The file system directory that is used to store administrative tools for an individual user. The MMC will save
+ /// customized consoles to this directory, and it will roam with the user.
+ ///
+ CSIDL_ADMINTOOLS = 0x0030,
+
+ /// The virtual folder that represents Network Connections, that contains network and dial-up connections.
+ CSIDL_CONNECTIONS = 0x0031,
+
+ ///
+ /// Version 6.0. The file system directory that serves as a repository for music files common to all users. A typical path is
+ /// C:\Documents and Settings\All Users\Documents\My Music.
+ ///
+ CSIDL_COMMON_MUSIC = 0x0035,
+
+ ///
+ /// Version 6.0. The file system directory that serves as a repository for image files common to all users. A typical path is
+ /// C:\Documents and Settings\All Users\Documents\My Pictures.
+ ///
+ CSIDL_COMMON_PICTURES = 0x0036,
+
+ ///
+ /// Version 6.0. The file system directory that serves as a repository for video files common to all users. A typical path is
+ /// C:\Documents and Settings\All Users\Documents\My Videos.
+ ///
+ CSIDL_COMMON_VIDEO = 0x0037,
+
+ /// Windows Vista. The file system directory that contains resource data. A typical path is C:\Windows\Resources.
+ CSIDL_RESOURCES = 0x0038,
+
+ ///
+ CSIDL_RESOURCES_LOCALIZED = 0x0039,
+
+ /// This value is recognized in Windows Vista for backward compatibility, but the folder itself is no longer used.
+ CSIDL_COMMON_OEM_LINKS = 0x003a,
+
+ ///
+ /// Version 6.0. The file system directory that acts as a staging area for files waiting to be written to a CD. A typical path is
+ /// C:\Documents and Settings\username\Local Settings\Application Data\Microsoft\CD Burning.
+ ///
+ CSIDL_CDBURN_AREA = 0x003b,
+
+ /// The folder that represents other computers in your workgroup.
+ CSIDL_COMPUTERSNEARME = 0x003d,
+ }
+
/// A flag that controls the action of SHGetSetFolderCustomSettings.
[PInvokeData("shlobj_core.h", MSDNShortId = "38b78a4b-ba68-4dff-812d-d4c7421eb202")]
[Flags]
@@ -1989,42 +2281,6 @@ namespace Vanara.PInvoke
VALIDATEUNC_PERSIST = 0x0008,
}
- ///
- /// CSIDL (constant special item ID list) values provide a unique system-independent way to identify special folders used frequently
- /// by applications, but which may not have the same name or location on any given system. For example, the system folder may be
- /// "C:\Windows" on one system and "C:\Winnt" on another. These constants are defined in Shlobj.h.
- ///
- [PInvokeData("Shlobj.h", MSDNShortId = "bb762494")]
- public enum CSIDL
- {
- CSIDL_ADMINTOOLS = 0x0030,
- CSIDL_CDBURN_AREA = 0x003b,
- CSIDL_COMMON_ADMINTOOLS = 0x002f,
- CSIDL_COMMON_DESKTOPDIRECTORY = 0x0019,
- CSIDL_COMMON_DOCUMENTS = 0x002e,
- CSIDL_COMMON_MUSIC = 0x0035,
- CSIDL_COMMON_OEM_LINKS = 0x003a,
- CSIDL_COMMON_PICTURES = 0x0036,
- CSIDL_COMMON_PROGRAMS = 0X0017,
- CSIDL_COMMON_STARTMENU = 0x0016,
- CSIDL_COMMON_STARTUP = 0x0018,
- CSIDL_COMMON_TEMPLATES = 0x002d,
- CSIDL_COMMON_VIDEO = 0x0037,
- CSIDL_FLAG_CREATE = 0x8000, // force folder creation in SHGetFolderPath
- CSIDL_FLAG_DONT_VERIFY = 0x4000, // return an unverified folder path
- CSIDL_FONTS = 0x0014, // windows\fonts
- CSIDL_MYVIDEO = 0x000e, // "My Videos" folder
- CSIDL_NETHOOD = 0x0013, // %APPDATA%\Microsoft\Windows\Network Shortcuts
- CSIDL_PRINTHOOD = 0x001b, // %APPDATA%\Microsoft\Windows\Printer Shortcuts
- CSIDL_PROFILE = 0x0028, // %USERPROFILE% (%SystemDrive%\Users\%USERNAME%)
- CSIDL_PROGRAM_FILES_COMMONX86 = 0x002c, // x86 Program Files\Common on RISC
- CSIDL_PROGRAM_FILESX86 = 0x002a, // x86 C:\Program Files on RISC
- CSIDL_RESOURCES = 0x0038, // %windir%\Resources
- CSIDL_RESOURCES_LOCALIZED = 0x0039, // %windir%\resources\0409 (code page)
- CSIDL_SYSTEMX86 = 0x0029, // %windir%\system32
- CSIDL_WINDOWS = 0x0024, // GetWindowsDirectory()
- }
-
///
/// Retrieves the value for a given property key using the file association information provided by the Namespace Extensions.
///
@@ -2809,8 +3065,8 @@ namespace Vanara.PInvoke
/// Type: BOOL
/// Returns if successful; otherwise, .
///
- // https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-pickicondlg
- // int PickIconDlg( HWND hwnd, PWSTR pszIconPath, UINT cchIconPath, int *piIconIndex );
+ // https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-pickicondlg int PickIconDlg( HWND hwnd, PWSTR
+ // pszIconPath, UINT cchIconPath, int *piIconIndex );
[DllImport(Lib.Shell32, SetLastError = false, ExactSpelling = true)]
[PInvokeData("shlobj_core.h", MSDNShortId = "3dfcda10-26d8-495d-8c92-7ff16da098c1")]
[return: MarshalAs(UnmanagedType.Bool)]
@@ -3283,15 +3539,20 @@ namespace Vanara.PInvoke
/// Given a Shell namespace item specified in the form of a folder, and an item identifier list relative to that folder, this
/// function binds to the parent of the namespace item and optionally returns a pointer to the final component of the item identifier list.
///
- /// The type of the requested interface. This is typically IShellFolder or IShellFolder2, but
- /// can be anything supported by the target folder.
- /// Type: IShellFolder*
- /// A pointer to a Shell folder object. If is NULL, indicates that the IDList passed is relative to the desktop.
- /// Type: PCUIDLIST_RELATIVE
- /// A PIDL to bind to, relative to . If is NULL, this is an absolute IDList relative to the desktop folder.
+ ///
+ /// The type of the requested interface. This is typically IShellFolder or IShellFolder2, but can be anything supported by the target folder.
+ ///
+ ///
+ /// Type: IShellFolder*
+ /// A pointer to a Shell folder object. If is NULL, indicates that the IDList passed is relative to the desktop.
+ ///
+ ///
+ /// Type: PCUIDLIST_RELATIVE
+ /// A PIDL to bind to, relative to . If is NULL, this is an absolute IDList relative to the desktop folder.
+ ///
///
- /// When this function returns, contains the interface pointer requested. This is typically IShellFolder or IShellFolder2, but
- /// can be anything supported by the target folder.
+ /// When this function returns, contains the interface pointer requested. This is typically IShellFolder or IShellFolder2, but can be
+ /// anything supported by the target folder.
///
///
/// Note Calling the SHBindToFolderIDListParent function is equivalent to calling the SHBindToFolderIDListParentEx
@@ -3384,31 +3645,39 @@ namespace Vanara.PInvoke
public static TIntf SHBindToFolderIDListParentEx(IShellFolder psfRoot = null, PIDL pidl = null, IBindCtx ppbc = null) where TIntf : class =>
IidGetObj((in Guid g, out object o) => SHBindToFolderIDListParentEx(psfRoot, pidl, ppbc, g, out o, out var _));
- ///
- /// Retrieves and binds to a specified object by using the Shell namespace IShellFolder::BindToObject method.
- ///
- /// Type: IShellFolder*
+ /// Retrieves and binds to a specified object by using the Shell namespace IShellFolder::BindToObject method.
+ ///
+ /// Type: IShellFolder*
///
/// A pointer to IShellFolder. This parameter can be NULL. If is NULL, this indicates parameter is relative to the
/// desktop. In this case, must specify an absolute ITEMIDLIST.
- ///
- /// Type: PCUIDLIST_RELATIVE
+ ///
+ ///
+ ///
+ /// Type: PCUIDLIST_RELATIVE
///
/// A pointer to a constant ITEMIDLIST to bind to that is relative to . If is NULL, this is an absolute ITEMIDLIST
/// relative to the desktop folder.
- ///
- /// Type: IBindCtx*
+ ///
+ ///
+ ///
+ /// Type: IBindCtx*
///
/// A pointer to IBindCtx interface on a bind context object to be used during this operation. If this parameter is not used, set it
/// to NULL. Because support for is optional for folder object implementations, some folders may not support the use of bind contexts.
- ///
- /// Type: REFIID
- /// Identifier of the interface to return.
- /// Type: void**
+ ///
+ ///
+ ///
+ /// Type: REFIID
+ /// Identifier of the interface to return.
+ ///
+ ///
+ /// Type: void**
///
/// When this method returns, contains the interface pointer as specified in to the bound object. If an error occurs, contains a
/// NULL pointer.
- ///
+ ///
+ ///
///
/// Type: HRESULT
/// If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
@@ -3420,25 +3689,29 @@ namespace Vanara.PInvoke
[PInvokeData("shlobj_core.h", MSDNShortId = "acc16097-8301-4118-8cb5-00aa2705306a")]
public static extern HRESULT SHBindToObject(IShellFolder psf, PIDL pidl, IBindCtx pbc, in Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppv);
- ///
- /// Retrieves and binds to a specified object by using the Shell namespace IShellFolder::BindToObject method.
- ///
+ /// Retrieves and binds to a specified object by using the Shell namespace IShellFolder::BindToObject method.
/// Type of the interface to return.
- /// Type: IShellFolder*
+ ///
+ /// Type: IShellFolder*
///
/// A pointer to IShellFolder. This parameter can be NULL. If is NULL, this indicates parameter is relative to the
/// desktop. In this case, must specify an absolute ITEMIDLIST.
- ///
- /// Type: PCUIDLIST_RELATIVE
+ ///
+ ///
+ ///
+ /// Type: PCUIDLIST_RELATIVE
///
/// A pointer to a constant ITEMIDLIST to bind to that is relative to . If is NULL, this is an absolute ITEMIDLIST
/// relative to the desktop folder.
- ///
- /// Type: IBindCtx*
+ ///
+ ///
+ ///
+ /// Type: IBindCtx*
///
/// A pointer to IBindCtx interface on a bind context object to be used during this operation. If this parameter is not used, set it
/// to NULL. Because support for is optional for folder object implementations, some folders may not support the use of bind contexts.
- ///
+ ///
+ ///
///
/// When this method returns, contains the interface pointer as specified in to the bound object. If an error occurs, contains a
/// NULL pointer.
@@ -3492,8 +3765,10 @@ namespace Vanara.PInvoke
/// Takes a pointer to a fully qualified item identifier list (PIDL), and returns a specified interface pointer on the parent object.
///
/// The Type of one of the interfaces exposed by the item's parent object.
- /// Type: PCIDLIST_ABSOLUTE
- /// The item's PIDL.
+ ///
+ /// Type: PCIDLIST_ABSOLUTE
+ /// The item's PIDL.
+ ///
/// A pointer to the interface specified. You must release the object when you are finished.
// https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-shbindtoparent SHSTDAPI SHBindToParent(
// PCIDLIST_ABSOLUTE pidl, REFIID riid, void **ppv, PCUITEMID_CHILD *ppidlLast );
@@ -3539,8 +3814,8 @@ namespace Vanara.PInvoke
/// Type: HANDLE
/// Returns a handle (HLOCK) to the locked memory. Pass this value to SHChangeNotification_Unlock when finished.
///
- // https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-shchangenotification_lock
- // HANDLE SHChangeNotification_Lock( HANDLE hChange, DWORD dwProcId, PIDLIST_ABSOLUTE **pppidl, LONG *plEvent );
+ // https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-shchangenotification_lock HANDLE
+ // SHChangeNotification_Lock( HANDLE hChange, DWORD dwProcId, PIDLIST_ABSOLUTE **pppidl, LONG *plEvent );
[DllImport(Lib.Shell32, SetLastError = false, ExactSpelling = true)]
[PInvokeData("shlobj_core.h", MSDNShortId = "8e22d5d0-64be-403c-982d-c23705d85223")]
public static extern HLOCK SHChangeNotification_Lock(HWND hChange, uint dwProcId, out IntPtr pppidl, out SHCNE plEvent);
@@ -4276,8 +4551,8 @@ namespace Vanara.PInvoke
/// It is the responsibility of the caller to free the icon resources created through this function when they are no longer needed.
/// This can be done through the DestroyIcon function.
///
- // https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-shdefextracticona
- // SHSTDAPI SHDefExtractIconA( LPCSTR pszIconFile, int iIndex, UINT uFlags, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize );
+ // https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-shdefextracticona SHSTDAPI SHDefExtractIconA(
+ // LPCSTR pszIconFile, int iIndex, UINT uFlags, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize );
[DllImport(Lib.Shell32, SetLastError = false, CharSet = CharSet.Auto)]
[PInvokeData("shlobj_core.h", MSDNShortId = "fbaa600a-5e5c-4948-81fb-d2c3993dcd47")]
public static extern HRESULT SHDefExtractIcon(string pszIconFile, int iIndex, GetIconLocationResultFlags uFlags, out SafeHICON phiconLarge, out SafeHICON phiconSmall, uint nIconSize);
@@ -6345,18 +6620,22 @@ namespace Vanara.PInvoke
/// Creates a unique name for a stream or storage object from a template.
/// The type of the interface to retrieve through, typically IStorage or IStream.
- /// Type: IStorage*
- /// A pointer to an IStorage object.
- /// Type: PCWSTR
- /// The format or template for the name of the stream or storage object.
- /// Type: DWORD
+ ///
+ /// Type: IStorage*
+ /// A pointer to an IStorage object.
+ ///
+ ///
+ /// Type: PCWSTR
+ /// The format or template for the name of the stream or storage object.
+ ///
+ ///
+ /// Type: DWORD
///
/// The access mode to use when opening the stream or storage object. For more information and descriptions of the possible values,
/// see STGM Constants.
- ///
- ///
- /// When this method returns, contains the interface pointer requested in . This is typically IStorage or IStream.
- ///
+ ///
+ ///
+ /// When this method returns, contains the interface pointer requested in . This is typically IStorage or IStream.
// https://docs.microsoft.com/en-us/windows/desktop/api/shlobj_core/nf-shlobj_core-stgmakeuniquename HRESULT StgMakeUniqueName(
// IStorage *pstgParent, PCWSTR pszFileSpec, DWORD grfMode, REFIID riid, void **ppv );
[PInvokeData("shlobj_core.h", MSDNShortId = "d45ec25c-359b-46f8-b0f6-5888525c7349")]
@@ -6643,11 +6922,11 @@ namespace Vanara.PInvoke
///
public IQueryAssociations punkAssociationInfo;
- /// 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.
+ ///
+ /// 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.
///
public uint cKeys;
diff --git a/PInvoke/Shell32/Vanara.PInvoke.Shell32.csproj b/PInvoke/Shell32/Vanara.PInvoke.Shell32.csproj
index 73433e23..d80fd4fe 100644
--- a/PInvoke/Shell32/Vanara.PInvoke.Shell32.csproj
+++ b/PInvoke/Shell32/Vanara.PInvoke.Shell32.csproj
@@ -69,4 +69,7 @@ IAutoComplete, IAutoComplete2, IShellFolderViewDual, IOleCommandTarget, IShellWi
+
+
+
\ No newline at end of file