IPersistFolder3::InitializeEx method (shobjidl_core.h)

Initializes a folder and specifies its location in the namespace. If the folder is a shortcut, this method also specifies the location of the target folder.

Syntax

HRESULT InitializeEx(
  [in] IBindCtx                         *pbc,
  [in] PCIDLIST_ABSOLUTE                pidlRoot,
  [in] const PERSIST_FOLDER_TARGET_INFO *ppfti
);

Parameters

[in] pbc

Type: IBindCtx*

A pointer to an IBindCtx object that provides the bind context. This parameter can be NULL.

[in] pidlRoot

Type: LPCITEMIDLIST

A pointer to a fully qualified PIDL that specifies the absolute location of a folder or folder shortcut. The calling application is responsible for allocating and freeing this PIDL.

[in] ppfti

Type: const PERSIST_FOLDER_TARGET_INFO*

A pointer to a PERSIST_FOLDER_TARGET_INFO structure that specifies the location of the target folder and its attributes.

If ppfti points to a valid structure, pidlRoot represents a folder shortcut.

If ppfti is set to NULL, pidlRoot represents a normal folder. In that case, InitializeEx should behave as if Initialize had been called.

Return value

Type: HRESULT

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

Remarks

This function is an extended version of IPersistFolder::Initialize. It allows the Shell to initialize folder shortcuts as well as normal folders.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional with SP3, Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)
DLL Shell32.dll (version 5.0 or later)