From 1307ad6eac7102928614786dcec0787db7cd5a5b Mon Sep 17 00:00:00 2001 From: dahall Date: Mon, 20 Sep 2021 08:54:58 -0600 Subject: [PATCH] Added SHCIDS constants --- PInvoke/Shell32/ShObjIdl.IShellFolder.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/PInvoke/Shell32/ShObjIdl.IShellFolder.cs b/PInvoke/Shell32/ShObjIdl.IShellFolder.cs index 4d436560..58d90240 100644 --- a/PInvoke/Shell32/ShObjIdl.IShellFolder.cs +++ b/PInvoke/Shell32/ShObjIdl.IShellFolder.cs @@ -11,6 +11,10 @@ namespace Vanara.PInvoke { public static partial class Shell32 { + /// To extract the sorting rule, use a bitwise AND operator (&) to combine lParam with SHCIDS_COLUMNMASK (0X0000FFFF). + /// This operation masks off the upper sixteen bits of lParam. + public const SHCIDS SHCIDS_COLUMNMASK = (SHCIDS)0x0000FFFF; + /// Provides a set of flags for use with the CATEGORY_INFO structure. // https://docs.microsoft.com/en-us/windows/win32/api/shobjidl_core/ne-shobjidl_core-categoryinfo_flags typedef enum // CATEGORYINFO_FLAGS { CATINFO_NORMAL, CATINFO_COLLAPSED, CATINFO_HIDDEN, CATINFO_EXPANDED, CATINFO_NOHEADER, @@ -83,6 +87,28 @@ namespace Vanara.PInvoke FEM_NAVIGATION, } + /// Flags that modify the sorting rule. + [PInvokeData("shobjidl_core.h")] + [Flags] + public enum SHCIDS : uint + { + /// + /// Version 5.0. When comparing by name, compare the system names but not the display names. When this flag is passed, the two + /// items are compared by whatever criteria the Shell folder determines are most efficient, as long as it implements a + /// consistent sort function. This flag is useful when comparing for equality or when the results of the sort are not displayed + /// to the user. This flag cannot be combined with other flags. + /// + SHCIDS_CANONICALONLY = 0x10000000, + + /// + /// Version 5.0. Compare all the information contained in the ITEMIDLIST structure, not just the display names. This flag is + /// valid only for folder objects that support the IShellFolder2 interface. For instance, if the two items are files, the folder + /// should compare their names, sizes, file times, attributes, and any other information in the structures. If this flag is set, + /// the lower sixteen bits of lParam must be zero. + /// + SHCIDS_ALLFIELDS = 0x80000000 + } + /// /// Determines the types of items included in an enumeration. These values are used with the IShellFolder::EnumObjects method. ///