Shell32SHCreateShellItem Method

Creates an IShellItem object.

Note: It is recommended that you use SHCreateItemWithParent(PIDL, IShellFolder, PIDL, Guid, IShellItem) or SHCreateItemFromIDList(PIDL, Guid, IShellItem) instead of this function.

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", ExactSpelling = true)]
public static HResult SHCreateShellItem(
	PIDL pidlParent,
	IShellFolder folderParent,
	PIDL pidl,
	out IShellItem refShellItem
)

Parameters

pidlParent  PIDL
A PIDL to the parent. This value can be NULL.
folderParent  IShellFolder
A pointer to the parent IShellFolder. This value can be NULL.
pidl  PIDL
A PIDL to the requested item.

If parent information is not included in pidlParent or folderParent, this must be an absolute PIDL.

refShellItem  IShellItem
When this method returns, contains the interface pointer to the new IShellItem.

Return Value

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

Remarks

See Also