Contents Index Topic Contents | ||
Previous Topic: IShellFolder::EnumObjects Next Topic: IShellFolder::GetDisplayNameOf |
IShellFolder::GetAttributesOf
HRESULT GetAttributesOf( UINT cidl, LPCITEMIDLIST *apidl, ULONG *rgfInOut );Retrieves the attributes of one or more file objects or subfolders.
- Returns NOERROR if successful, or an OLE-defined error value otherwise.
- cidl
- Number of file objects from which to retrieve attributes.
- apidl
- Address of an array of pointers to ITEMIDLIST structures, each of which uniquely identifies a file object relative to the parent folder. Each ITEMIDLIST structure must contain exactly one SHITEMID structure followed by a terminating zero.
- rgfInOut
- Address of a single ULONG value that, on entry, contains the attributes that the caller is requesting. On exit, this value contains the requested attributes that are common to all of the specified objects. Note that this is the address of a single ULONG value, not an array of ULONG values. The lists below describe the possible flags for this parameter.
A file object's capability flags may be zero or a combination of the following values:
SFGAO_CANCOPY The specified file objects or folders can be copied (same value as the DROPEFFECT_COPY flag). SFGAO_CANDELETE The specified file objects or folders can be deleted. SFGAO_CANLINK It is possible to create shortcuts for the specified file objects or folders (same value as the DROPEFFECT_LINK flag). SFGAO_CANMOVE The specified file objects or folders can be moved (same value as the DROPEFFECT_MOVE flag). SFGAO_CANRENAME The specified file objects or folders can be renamed. SFGAO_CAPABILITYMASK Mask for the capability flags. SFGAO_DROPTARGET The specified file objects or folders are drop targets. SFGAO_HASPROPSHEET The specified file objects or folders have property sheets. A file object's display attributes may be zero or a combination of the following values:
SFGAO_DISPLAYATTRMASK Mask for the display attributes. SFGAO_GHOSTED The specified file objects or folders should be displayed using a ghosted icon. SFGAO_LINK The specified file objects are shortcuts. SFGAO_READONLY The specified file objects or folders are read-only. SFGAO_SHARE The specified folders are shared. A file object's contents flags may be zero or a combination of the following values:
SFGAO_CONTENTSMASK Mask for the contents attributes. SFGAO_HASSUBFOLDER The specified folders have subfolders (and are, therefore, expandable in the left pane of Windows Explorer). A file object's miscellaneous attributes may be zero or a combination of the following values:
SFGAO_BROWSABLE The specified items can be browsed in place. SFGAO_COMPRESSED The specified items are compressed. SFGAO_FILESYSTEM The specified folders or file objects are part of the file system (that is, they are files, directories, or root directories). SFGAO_FILESYSANCESTOR The specified folders contain one or more file system folders. SFGAO_FOLDER The specified items are folders. SFGAO_NEWCONTENT The objects contain new content. SFGAO_NONENUMERATED The items are nonenumerated items. SFGAO_REMOVABLE The specified file objects or folders are on removable media. SFGAO_VALIDATE Validate cached information. The shell will validate that the objects specified in apidl still exist and will not used cached information when retrieving the attributes. If one or more of the items specified in apidl no longer exist, this method will return an error code. If cidl is zero, the shell will discard all cached information for the shell folder. This is similar to doing a refresh of the folder. You can optimize this operation by not returning unspecified flags.
See also IShellFolder
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.