SHGetFileInfoFlags Enumeration

Definition

Namespace: DevCase.Win32.Enums
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[FlagsAttribute]
public enum SHGetFileInfoFlags

Remarks

Members

IconSizeLarge 0 Modify Icon, causing the function to retrieve the file's large icon.

The image size is normally 32x32 pixels. However, if the Use large icons option is selected from the Effects section of the Appearance tab in Display Properties, the image is 48x48 pixels.

The Icon flag must also be set.

IconSizeSmall 1 Modify Icon, causing the function to retrieve the file's small icon.

Also used to modify SysIconIndex, causing the function to return the handle to the system image list that contains small icon images.

The image is the shell standard small icon size of 16x16, but the size can be customized by the user.

The Icon and/or SysIconIndex flag must also be set.

IconSizeExtraLarge 2 Modify Icon, causing the function to retrieve the file's open icon.

Also used to modify SysIconIndex, causing the function to return the handle to the system image list that contains the file's small open icon.

A container object displays an open icon to indicate that the container is open.

The image is the Shell standard extra-large icon size. This is typically 48x48, but the size can be customized by the user.

The Icon and/or SysIconIndex flag must also be set.

IconSizeJumbo 4 Modify Icon, causing the function to retrieve a Shell-sized icon.

If this flag is not specified the function sizes the icon according to the system metric values.

The image is normally 256x256 pixels.

The Icon flag must also be set.

PIDL 8 Indicate that path parameter is the address of an ITEMIDLIST structure rather than a path name.
UseFileAttributes 16 Indicates that the function should not attempt to access the file specified by path parameter.

Rather, it should act as if the file specified by path parameter exists with the file attributes passed in fileAttributes parameter.

This flag cannot be combined with the Attributes, ExeType, or PIDL flags.

AddOverlays 32 Apply the appropriate overlays to the file's icon.

The Icon flag must also be set.

OverlayIndex 64 Return the index of the overlay icon.

The value of the overlay index is returned in the upper eight bits of the IconIndex member of the structure specified by refShellFileInfo parameter.

This flag requires that the Icon be set as well.

Icon 256 Retrieve the handle to the icon that represents the file and the index of the icon within the system image list.

The handle is copied to the IconHandle member of the structure specified by refShellFileInfo parameter, and the index is copied to the IconIndex member.

DisplayName 512 Retrieve the display name for the file, which is the name as it appears in Windows Explorer.

The name is copied to the DisplayName member of the structure specified in refShellFileInfo parameter.

The returned display name uses the long file name, if there is one, rather than the 8.3 form of the file name.

Note that the display name can be affected by settings such as whether extensions are shown.

TypeName 1,024 Retrieve the string that describes the file's type.

The string is copied to the TypeName member of the structure specified in refShellFileInfo parameter.

Attributes 2,048 Retrieve the item attributes.

The attributes are copied to the Attributes member of the structure specified in the refShellFileInfo parameter.

These are the same attributes that are obtained from GetAttributesOf(UInt32, IntPtr, ShellItemAttributesMask).

IconLocation 4,096 Retrieve the name of the file that contains the icon representing the file specified by path parameter, as returned by the IExtractIcon::GetIconLocation method of the file's icon handler.

Also retrieve the icon index within that file.

The name of the file containing the icon is copied to the DisplayName member of the structure specified by refShellFileInfo parameter.

The icon's index is copied to that structure's IconIndex member.

ExeType 8,192 Retrieve the type of the executable file if path parameter identifies an executable file.

The information is packed into the return value.

This flag cannot be specified with any other flags.

SysIconIndex 16,384 Retrieve the index of a system image list icon.

If successful, the index is copied to the iIcon member of refShellFileInfo.

The return value is a handle to the system image list.

Only those images whose indices are successfully copied to IconIndex are valid.

Attempting to access other images in the system image list will result in undefined behavior

LinkOverlay 32,768 Modify Icon, causing the function to add the link overlay to the file's icon.

The Icon flag must also be set.

Selected 65,536 Modify Icon, causing the function to blend the file's icon with the system highlight color.

The Icon flag must also be set.

AttributeSpecified 131,072 Modify Attributes to indicate that the Attributes member of the structure at refShellFileInfo parameter contains the specific attributes that are desired.

These attributes are passed to GetAttributesOf(UInt32, IntPtr, ShellItemAttributesMask).

If this flag is not specified, 0xFFFFFFFF is passed to GetAttributesOf(UInt32, IntPtr, ShellItemAttributesMask), requesting all attributes.

This flag cannot be specified with the Icon flag.

See Also