| IShellFolderParseDisplayName Method |
Translates the display name of a file object or a folder into an item identifier list.
Namespace: Fesslersoft.WindowsAPI.Common.InterfacesAssembly: Fesslersoft.WindowsAPI (in Fesslersoft.WindowsAPI.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxint ParseDisplayName(
IntPtr hwnd,
IntPtr pbc,
string pszDisplayName,
ref uint pchEaten,
out IntPtr ppidl,
ref EnumSfgao pdwAttributes
)
Function ParseDisplayName (
hwnd As IntPtr,
pbc As IntPtr,
pszDisplayName As String,
ByRef pchEaten As UInteger,
<OutAttribute> ByRef ppidl As IntPtr,
ByRef pdwAttributes As EnumSfgao
) As Integer
int ParseDisplayName(
IntPtr hwnd,
IntPtr pbc,
String^ pszDisplayName,
unsigned int% pchEaten,
[OutAttribute] IntPtr% ppidl,
EnumSfgao% pdwAttributes
)
abstract ParseDisplayName :
hwnd : IntPtr *
pbc : IntPtr *
pszDisplayName : string *
pchEaten : uint32 byref *
ppidl : IntPtr byref *
pdwAttributes : EnumSfgao byref -> int
Parameters
- hwnd
- Type: SystemIntPtr
A window handle. The client should provide a window handle if it displays a dialog or message box.
Otherwise set hwnd to NULL.
- pbc
- Type: SystemIntPtr
Optional. A pointer to a bind context used to pass parameters as inputs and outputs to the parsing
function. These passed parameters are often specific to the data source and are documented by the data source
owners. For example, the file system data source accepts the name being parsed (as a WIN32_FIND_DATA structure),
using the STR_FILE_SYS_BIND_DATA bind context parameter. STR_PARSE_PREFER_FOLDER_BROWSING can be passed to indicate
that URLs are parsed using the file system data source when possible. Construct a bind context object using
CreateBindCtx and populate the values using IBindCtx::RegisterObjectParam. See Bind Context String Keys for a
complete list of these. If no data is being passed to or received from the parsing function, this value can be
NULL.
- pszDisplayName
- Type: SystemString
A null-terminated Unicode string with the display name. Because each Shell folder defines
its own parsing syntax, the form this string can take may vary. The desktop folder, for instance, accepts paths
such as "C:\My Docs\My File.txt". It also will accept references to items in the namespace that have a GUID
associated with them using the "::{GUID}" syntax. For example, to retrieve a fully qualified identifier list for
the control panel from the desktop folder, you can use the following:
- pchEaten
- Type: SystemUInt32
A pointer to a ULONG value that receives the number of characters of the display name that was
parsed. If your application does not need this information, set pchEaten to NULL, and no value will be returned.
- ppidl
- Type: SystemIntPtr
When this method returns, contains a pointer to the PIDL for the object. The returned item
identifier list specifies the item relative to the parsing folder. If the object associated with pszDisplayName is
within the parsing folder, the returned item identifier list will contain only one SHITEMID structure. If the
object is in a subfolder of the parsing folder, the returned item identifier list will contain multiple SHITEMID
structures. If an error occurs, NULL is returned in this address. When it is no longer needed, it is the
responsibility of the caller to free this resource by calling CoTaskMemFree.
- pdwAttributes
- Type: Fesslersoft.WindowsAPI.CommonEnumSfgao
The value used to query for file attributes. If not used, it should be set to NULL. To
query for one or more attributes, initialize this parameter with the SFGAO flags that represent the attributes of
interest. On return, those attributes that are true and were requested will be set.
Return Value
Type:
Int32If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
See Also