IShellFolder::GetAttributesOf method
Applies to: desktop apps only
Gets the attributes of one or more file or folder objects contained in the object represented by IShellFolder.
Syntax
HRESULT GetAttributesOf( [in] UINT cidl, [in] PCUITEMID_CHILD_ARRAY *apidl, [in, out] SFGAOF *rgfInOut );
Parameters
- cidl [in]
-
Type: UINT
The number of items from which to retrieve attributes.
- apidl [in]
-
Type: PCUITEMID_CHILD_ARRAY*
The address of an array of pointers to ITEMIDLIST structures, each of which uniquely identifies an item relative to the parent folder. Each ITEMIDLIST structure must contain exactly one SHITEMID structure followed by a terminating zero.
- rgfInOut [in, out]
-
Type: SFGAOF*
Pointer to a single ULONG value that, on entry, contains the bitwise SFGAO attributes that the calling application is requesting. On exit, this value contains the requested attributes that are common to all of the specified items.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
To optimize this operation, do not return unspecified flags.
For a folder object, the SFGAO_BROWSABLE attribute implies that the client can bind to this object as shown in a general form here.
The client can then create an IShellView on that item through this statement.
The SFGAO_DROPTARGET attribute implies that the client can bind to an instance of IDropTarget for this folder by calling IShellFolder::GetUIObjectOf as shown here.
The SFGAO_NONENUMERATED attribute indicates an item that is not returned by the enumerator created by the IShellFolder::EnumObjects method.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 3/7/2012
- 10/23/2011
- David Lowndes
Imports System.ComponentModel
''' <summary>
''' <b>SFGAO</b> - Attributes that can be retrieved on an item (file or folder) or set of items.
''' </summary>
''' <remarks>
''' http://msdn.microsoft.com/en-us/library/bb762589(VS.85).aspx
''' </remarks>
<Flags()> _
Public Enum FileFlags As UInt32 'ASAP:MSDN
SFGAO_BROWSABLE = &H8000000UI
SFGAO_CANCOPY = &H1
SFGAO_CANDELETE = &H20UI
SFGAO_CANLINK = &H4
SFGAO_CANMONIKER = &H400000UI
SFGAO_CANMOVE = &H2
SFGAO_CANRENAME = &H10UI
<EditorBrowsable(EditorBrowsableState.Never)> SFGAO_CAPABILITYMASK = &H177UI
SFGAO_COMPRESSED = &H4000000UI
<EditorBrowsable(EditorBrowsableState.Never)> SFGAO_CONTENTSMASK = &H80000000UI
<EditorBrowsable(EditorBrowsableState.Never)> SFGAO_DISPLAYATTRMASK = &HF0000UI
SFGAO_DROPTARGET = &H100UI
SFGAO_ENCRYPTED = &H2000UI
SFGAO_FILESYSANCESTOR = &H10000000UI
SFGAO_FILESYSTEM = &H40000000UI
SFGAO_FOLDER = &H20000000UI
SFGAO_GHOSTED = &H80000UI
SFGAO_HASPROPSHEET = &H40UI
<EditorBrowsable(EditorBrowsableState.Never)> SFGAO_HASSTORAGE = &H400000UI
SFGAO_HASSUBFOLDER = &H80000000UI
SFGAO_HIDDEN = &H80000UI
SFGAO_ISSLOW = &H4000UI
SFGAO_LINK = &H10000UI
SFGAO_NEWCONTENT = &H200000UI
SFGAO_NONENUMERATED = &H100000UI
SFGAO_PKEYSFGAOMASK = &H81044000UI
SFGAO_READONLY = &H40000UI
SFGAO_REMOVABLE = &H2000000UI
SFGAO_SHARE = &H20000UI
SFGAO_STORAGEANCESTOR = &H10000000UI
SFGAO_STORAGECAPMASK = &H70C50008UI
SFGAO_STREAM = &H400000UI
SFGAO_VALIDATE = &H1000000UI
End Enum