Group: Shell Functions - Library: shell32
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).
Displaying system dialog that selects a folder
HRESULT SHParseDisplayName(
LPCWSTR pszName,
IBindCtx *pbc,
LPITEMIDLIST *ppidl,
SFGAOF sfgaoIn,
SFGAOF *psfgaoOut
);
DECLARE INTEGER SHParseDisplayName IN shell32;
STRING pszName,;
INTEGER pbc,;
STRING @ ppidl,;
INTEGER sfgaoIn,;
INTEGER @ psfgaoOut
pszName [in] Pointer to a zero-terminated wide string that contains the display name to parse.
pbc [in] A bind context that controls the parsing operation. This parameter is normally set to NULL.
ppidl [out] Address of a pointer to a variable of type ITEMIDLIST that receives the item identifier list for the object.
sfgaoIn [in] A ULONG value that specifies the attributes to query.
psfgaoOut [out] Pointer to a ULONG. On return, those attributes that are true for the object and were requested in sfgaoIn are set.
Returns S_OK (0) if successful, or an error value otherwise.
The calling application is responsible for freeing the returned PIDL.
ITEMIDLIST structure contains a list of item identifiers.
See also: SHSimpleIDListFromPath, SHGetPathFromIDList