SHParseDisplayName function
Translates a Shell namespace object's display name into an item identifier list and returns the attributes of the object. This function is the preferred method to convert a string to a pointer to an item identifier list (PIDL).
Syntax
HRESULT SHParseDisplayName( _In_ LPCWSTR pszName, _In_opt_ IBindCtx *pbc, _Out_ PIDLIST_ABSOLUTE *ppidl, _In_ SFGAOF sfgaoIn, _Out_opt_ SFGAOF *psfgaoOut );
Parameters
- pszName [in]
-
Type: LPCWSTR
A pointer to a zero-terminated wide string that contains the display name to parse.
- pbc [in, optional]
-
Type: IBindCtx*
A bind context that controls the parsing operation. This parameter is normally set to NULL.
- ppidl [out]
-
Type: PIDLIST_ABSOLUTE*
The address of a pointer to a variable of type ITEMIDLIST that receives the item identifier list for the object. If an error occurs, then this parameter is set to NULL.
- sfgaoIn [in]
-
Type: SFGAOF
A ULONG value that specifies the attributes to query. To query for one or more attributes, initialize this parameter with the flags that represent the attributes of interest. For a list of available SFGAO flags, see IShellFolder::GetAttributesOf.
- psfgaoOut [out, optional]
-
Type: SFGAOF*
A pointer to a ULONG. On return, those attributes that are true for the object and were requested in sfgaoIn are set. An object's attribute flags can be zero or a combination of SFGAO flags. For a list of available SFGAO flags, see IShellFolder::GetAttributesOf.
Return value
Type: HRESULT
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
You should call this function from a background thread. Failure to do so could cause the UI to stop responding.
Requirements
|
Minimum supported client |
Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
- IShellFolder::GetAttributesOf
- IShellFolder::ParseDisplayName
- ITEMIDLIST
- IBindCtx
- SHGetPathFromIDList