IShellFolder::GetAttributesOf method

Gets the attributes of one or more file or folder objects contained in the object represented by IShellFolder.

Syntax

HRESULT GetAttributesOf(
  UINT                  cidl,
  PCUITEMID_CHILD_ARRAY apidl,
  SFGAOF                *rgfInOut
);

Parameters

cidl

Type: UINT

The number of items from which to retrieve attributes.

apidl

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

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.

IShellFolder::BindToObject(..., pidl, IID_IShellFolder, &psfItem);

The client can then create an IShellView on that item through this statement.

psfItem->CreateViewObject(..., IID_IShellView,...);

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.

IShellFolder::GetUIObjectOf(hwnd, 1, &pidl, IID_IDropTarget, NULL, &pv)

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 [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll (version 4.0 or later)

See also

IShellFolder

IShellFolder2