SHCreateItemFromRelativeName function

Creates and initializes a Shell item object from a relative parsing name.

Syntax

SHSTDAPI SHCreateItemFromRelativeName(
  IShellItem *psiParent,
  PCWSTR     pszName,
  IBindCtx   *pbc,
  REFIID     riid,
  void       **ppv
);

Parameters

psiParent

Type: IShellItem*

A pointer to the parent Shell item.

pszName

Type: PCWSTR

A pointer to a null-terminated, Unicode string that specifies a display name that is relative to the psiParent.

pbc

Type: IBindCtx*

A pointer to a bind context that controls the parsing operation. This parameter can be NULL.

riid

Type: REFIID

A reference to an interface ID.

ppv

Type: void**

When this function returns, contains the interface pointer requested in riid. This will usually be IShellItem or IShellItem2.

Return Value

Type: HRESULT

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

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll