SHCreateItemFromRelativeName function

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

Syntax


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

Parameters

psiParent [in]

Type: IShellItem*

A pointer to the parent Shell item.

pszName [in]

Type: PCWSTR

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

pbc [in]

Type: IBindCtx*

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

riid [in]

Type: REFIID

A reference to an interface ID.

ppv [out]

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Shobjidl.h

DLL

Shell32.dll

 

 

Show: