Constants

All constants are accessible through the callback.CBFSShell.Constants class.

Shell Folder Attributes

SFGAO_CANCOPY 0x00000001 The specified items can be copied.

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

SFGAO_CANMOVE 0x00000002 The specified items can be moved.

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

SFGAO_CANLINK 0x00000004 Shortcuts 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_STORAGE 0x00000008 The 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_CANRENAME 0x00000010 The specified items can be renamed.

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

SFGAO_CANDELETE 0x00000020 The specified items can be deleted.

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

SFGAO_HASPROPSHEET 0x00000040 The specified items have property sheets.

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

SFGAO_ISDROPTARGET 0x00000100 The specified items are drop targets.

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

SFGAO_PLACEHOLDER 0x00000800 The specified items are not fully present and recalled on open or access.

SFGAO_SYSTEM 0x00001000 The specified items are system items.

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

SFGAO_ENCRYPTED 0x00002000 The specified items are encrypted and might require special presentation.

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

SFGAO_ISSLOW 0x00004000 Accessing 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_GHOSTED 0x00008000 The specified items are shown as dimmed and unavailable to the user.

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

SFGAO_LINK 0x00010000 The specified items are shortcuts.

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

SFGAO_SHARE 0x00020000 The specified objects are shared.

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

SFGAO_READONLY 0x00040000 The 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_HIDDEN 0x00080000 The 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_NONENUMERATED 0x00100000 The items are non-enumerated items and should be hidden.

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

SFGAO_NEWCONTENT 0x00200000 The items contain new content, as defined by the particular application.

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

SFGAO_STREAM 0x00400000 Indicates 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_STORAGEANCESTOR 0x00800000 Children 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_VALIDATE 0x01000000 When 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_REMOVABLE 0x02000000 The specified items are on removable media or are themselves removable devices.

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

SFGAO_COMPRESSED 0x04000000 The specified items are compressed.

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

SFGAO_BROWSABLE 0x08000000 The 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_FILESYSANCESTOR 0x10000000 The 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_FOLDER 0x20000000 The specified items are folders.

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

SFGAO_FILESYSTEM 0x40000000 The 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_HASSUBFOLDER 0x80000000 The 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.

Namespace Locations

NS_LOCATION_NONE No location.

Used for extensions that implement "file as folder" feature and that may appear anywhere within the Shell namespace.

NS_LOCATION_COMMONPLACES CommonPlaces Add or Remove Programs Shell folder or Programs and Features (Windows 10 and later).

Corresponds to FOLDERID_ChangeRemovePrograms well-known ID.

NS_LOCATION_CONTROLPANEL ControlPanel Control Panel folder.

Corresponds to FOLDERID_ControlPanelFolder well-known ID.

NS_LOCATION_DESKTOP Desktop Desktop folder and Desktop itself.

Corresponds to FOLDERID_Desktop well-known ID.

NS_LOCATION_FONTS FontsFolder Fonts folder.

Corresponds to FOLDERID_Fonts well-known ID.

NS_LOCATION_MYCOMPUTER MyComputer My Computer Shell folder.

Corresponds to FOLDERID_ComputerFolder well-known ID.

NS_LOCATION_NETWORK_NEIGHBORHOOD NetworkNeighborhood Network Shell folder.

Corresponds to FOLDERID_NetworkFolder well-known ID.

NS_LOCATION_ENTIRE_NETWORK NetworkNeighborhood\\\\EntireNetwork Network Shortcuts folder.

Corresponds to FOLDERID_NetHood well-known ID.

NS_LOCATION_PRINTERS_AND_FAXES PrintersAndFaxes Printers and Faxes folder or Devices and Printers (Windows 10 or later).

Corresponds to FOLDERID_PrintersFolder well-known ID.

NS_LOCATION_USERS_FILES UsersFiles User's root folder.

Corresponds to FOLDERID_UsersFiles well-known ID.

NS_LOCATION_USERS_LIBRARIES UsersLibraries Libraries folder.

Corresponds to FOLDERID_UsersLibraries well-known ID.

Error Codes

CBFSSHELL_ERR_CANT_LOAD_PROXY 20 Cannot load native proxy DLL.

The attempted location can be found in the error message.

CBFSSHELL_ERR_PROXY_VERSION_MISMATCH 28 The major version of the proxy DLL doesn't match the major version of the .NET assembly.

CBFSSHELL_ERR_NOT_INSTALLED 55 Proxy DLL not installed properly.

CBFSSHELL_ERR_INSTALL_FAILED 56 Installation of the native proxy DLL failed.

The specific error code returned by the OS can be found in the error message.

CBFSSHELL_ERR_UNINSTALL_FAILED 57 Deinstallation of the native proxy DLL failed.

The specific error code returned by the OS can be found in the error message.

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