 |
SHParseDisplayName ..msdn Add comment W32 Constants Translate this page |
 |
 |
|
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). |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
HRESULT SHParseDisplayName(
LPCWSTR pszName,
IBindCtx *pbc,
LPITEMIDLIST *ppidl,
SFGAOF sfgaoIn,
SFGAOF *psfgaoOut
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER SHParseDisplayName IN shell32;
STRING pszName,;
INTEGER pbc,;
STRING @ ppidl,;
INTEGER sfgaoIn,;
INTEGER @ psfgaoOut
|
 |
 |
 |
| Parameters: |
 |
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. |
 |
 |
| Return value: |
 |
| Returns S_OK (0) if successful, or an error value otherwise. |
 |
 |
| Usage: |
 |
FUNCTION PIDLFromPath( cPath As String ) As Number
* returns PIDL for a given path
LOCAL cBuffer, nResult
cPath = STRCONV(m.cPath+CHR(0), 5)
cBuffer = REPLICATE(CHR(0), 4)
nResult = SHParseDisplayName(m.cPath,;
0, @cBuffer, 0,0)
RETURN IIF( nResult=0, buf2dword(m.cBuffer), 0)
|
 |
 |
| My comment: |
 |
The calling application is responsible for freeing the returned PIDL.
ITEMIDLIST structure contains a list of item identifiers.
typedef struct _ITEMIDLIST {
SHITEMID mkid;
}
A pointer to this structure, called a PIDL, is used to identify objects in the Shell namespace.
See also: SHSimpleIDListFromPath, SHGetPathFromIDList |
 |
 |
| Word Index links for the SHParseDisplayName : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2004-08-03 12:38:27 | | Modified: | 2011-01-15 14:21:09 | Visited in last 7 days: 14 |