Attributes Property

This contains various options of virtual folder behavior.

Syntax

public long Attributes { get; set; }
Public Property Attributes As Long

Default Value

0xa0c00108

Remarks

This property specifies various options, related to the behavior of the virtual folder, created by the Shell Namespace Extension.

Set this property before calling the Install method.

The property should contain zero or more of the following flags, OR'd together:

SFGAO_CANCOPY0x00000001The specified items can be copied.

ShellItem property: CanCopy. Default for items: false. Default for folders: false.

SFGAO_CANMOVE0x00000002The specified items can be moved.

ShellItem property: CanMove. Default for items: false. Default for folders: false.

SFGAO_CANLINK0x00000004Shortcuts can be created for the specified items.

ShellItem property: CanLink. Default for items: true. Default for folders: true.

If a namespace extension returns this attribute, a Create Shortcut entry with a default handler is added to the shortcut menu that is displayed during drag-and-drop operations. The extension can also implement its own handler for the link verb in place of the default. If the extension does so, it is responsible for creating the shortcut. A Create Shortcut item is also added to the Windows Explorer File menu and to normal shortcut menus.

SFGAO_STORAGE0x00000008The specified items can be bound to an IStorage object.

Should not be changed if item content is used. Default for items: true. Default for folders: true.

SFGAO_CANRENAME0x00000010The specified items can be renamed.

ShellItem property: CanRename. Default for items: false. Default for folders: false.

SFGAO_CANDELETE0x00000020The specified items can be deleted.

ShellItem property: CanDelete. Default for items: false. Default for folders: false.

SFGAO_HASPROPSHEET0x00000040The specified items have property sheets.

ShellItem property: HasPropertySheet. Default for items: true. Default for folders: true.

SFGAO_ISDROPTARGET0x00000100The specified items are drop targets.

ShellItem property: IsDropTarget. Default for items: false. Default for folders: false.

SFGAO_PLACEHOLDER0x00000800The specified items are not fully present and recalled on open or access.

SFGAO_SYSTEM0x00001000The specified items are system items.

Default for items: false. Default for folders: false.

SFGAO_ENCRYPTED0x00002000The specified items are encrypted and might require special presentation.

Default for items: false. Default for folders: false.

SFGAO_ISSLOW0x00004000Accessing the item (through IStream or other storage interfaces) is expected to be a slow operation.

Default for items: false. Default for folders: false.

Applications should avoid accessing items flagged with SFGAO_ISSLOW.

SFGAO_GHOSTED0x00008000The specified items are shown as dimmed and unavailable to the user.

Default for items: false. Default for folders: false.

SFGAO_LINK0x00010000The specified items are shortcuts.

Default for items: false. Default for folders: false.

SFGAO_SHARE0x00020000The specified objects are shared.

Default for items: false. Default for folders: false.

SFGAO_READONLY0x00040000The specified items are read-only.

In the case of folders, this means that new items cannot be created in those folders. This should not be confused with the behavior specified by the file Read-Only attribute. Default for items: false. Default for folders: false.

SFGAO_HIDDEN0x00080000The item is hidden and should not be displayed unless the Show hidden files and folders option is enabled in Folder Settings.

ShellItem property: IsHidden. Default for items: false. Default for folders: false.

SFGAO_NONENUMERATED0x00100000The items are non-enumerated items and should be hidden.

Should not be changed. Default for items: false. Default for folders: false.

SFGAO_NEWCONTENT0x00200000The items contain new content, as defined by the particular application.

Default for items: false. Default for folders: false.

SFGAO_STREAM0x00400000Indicates that the item has a stream associated with it.

Should not be changed if item content is used. Default for items: true. Default for folders: true.

SFGAO_STORAGEANCESTOR0x00800000Children of this item are accessible through IStream or IStorage. Those children are flagged with SFGAO_STORAGE or SFGAO_STREAM.

Should not be changed if item content is used. Default for items: false. Default for folders: true.

SFGAO_VALIDATE0x01000000When specified as input, SFGAO_VALIDATE instructs the folder to validate that the items contained in a folder or Shell item array exist.

Should not be changed. Default for items: false. Default for folders: false.

SFGAO_REMOVABLE0x02000000The specified items are on removable media or are themselves removable devices.

Default for items: false. Default for folders: false.

SFGAO_COMPRESSED0x04000000The specified items are compressed.

Default for items: false. Default for folders: false.

SFGAO_BROWSABLE0x08000000The specified items can be hosted inside a web browser or Explorer frame.

Default for items: false. Default for folders: true.

To be used with non-folder items.

SFGAO_FILESYSANCESTOR0x10000000The specified folders are either file system folders or contain at least one descendant (child, grandchild, or later) that is a file system (SFGAO_FILESYSTEM) folder.

Already handled for physical ShellFolders instances. Default for items: false. Default for folders: false.

SFGAO_FOLDER0x20000000The specified items are folders.

Should not be changed. Default for items: false. Default for folders: true.

SFGAO_FILESYSTEM0x40000000The specified folders or files are part of the file system (that is, they are files, directories, or root directories).

The parsed names of the items can be assumed to be valid Win32 file system paths. These paths can be either UNC or drive-letter based.

Already handled for physical ShellFolders and ShellItems instances.

Default for items: true (physical) or false (virtual). Default for folders: true (physical) or false (virtual).

SFGAO_HASSUBFOLDER0x80000000The specified folders have subfolders.

The SFGAO_HASSUBFOLDER attribute is only advisory and might be returned by Shell folder implementations even if they do not contain subfolders. Note, however, that the converse - failing to return SFGAO_HASSUBFOLDER - definitively states that the folder objects do not have subfolders. Returning SFGAO_HASSUBFOLDER is recommended whenever a significant amount of time is required to determine whether any subfolders exist. For example, the Shell always returns SFGAO_HASSUBFOLDER when a folder is located on a network drive.

Already handled, but may be changed if needed (when we are sure that the folder is empty).

Default for items: false. Default for folders: true.


A more detailed description of the attributes can be found in the dedicated MSDN topic.
The most used SFGAO values have an equivalent .NET property in the ShellItem class.

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS Shell 2022 .NET Edition - Version 22.0 [Build 8172]