Shell32SHParseDisplayName(String, IntPtr, PIDL, ShellItemAttributesMask, ShellItemAttributesMask) Method

Translates a Shell namespace object's display name into an item identifier list (PIDL) 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).

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Shell32.dll", CharSet = CharSet.Auto, BestFitMapping = false, 
	ExactSpelling = true, ThrowOnUnmappableChar = true)]
public static HResult SHParseDisplayName(
	string name,
	[OptionalAttribute] IntPtr bindContext,
	out PIDL refPidl,
	ShellItemAttributesMask flagsIn,
	out ShellItemAttributesMask flagsOut
)

Parameters

name  String
A pointer to a zero-terminated wide string that contains the display name to parse.
bindContext  IntPtr  (Optional)
A bind context that controls the parsing operation.

This parameter is normally set to NULL.

refPidl  PIDL
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.

flagsIn  ShellItemAttributesMask
A value that specifies the attributes to query. To query for one or more attributes, initialize this parameter with the ShellItemAttributesMask flags that represent the attributes of interest.
flagsOut  ShellItemAttributesMask
On return, flagsOut receive those attributes that are for the object and were requested in flagsIn are set.

Return Value

HResult
If this function succeeds, it returns S_OK. Otherwise, it returns an HResult error code.

Remarks

See Also