SHGetAttributesFromDataObject function

[SHGetAttributesFromDataObject is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions.]

Retrieves specified pieces of information from a system data object.

Syntax

HRESULT SHGetAttributesFromDataObject(
  IDataObject *pdo,
  DWORD       dwAttributeMask,
  DWORD       *pdwAttributes,
  UINT        *pcItems
);

Parameters

pdo

Type: IDataObject*

The data object from which to retrieve the information.

dwAttributeMask

Type: DWORD

One or more of the SFGAO flags that indicate which pieces of information the calling application wants to retrieve.

pdwAttributes

Type: DWORD*

A pointer to a DWORD value that, when this function returns successfully, receives one or more SFGAO flags that indicate the attributes, among those requested, that are common to all items in pdo. This pointer can be NULL if this information is not needed.

pcItems

Type: UINT*

A pointer to a UINT that, when this function returns successfully, receives the number of PIDLs in the data object pointed to by pdo. This pointer can be NULL if this information is not needed.

Return Value

Type: HRESULT

This function can return one of these values.

Return code Description
S_OK
Success.
S_FALSE
The object is not a system data object. In this case, pdwAttributes is set to 0.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shlobj_core.h (include Shlobj.h)
Library Shell32.lib
DLL Shell32.dll (version 6.0 or later)