IDefaultFolderMenuInitialize::Initialize method (shobjidl_core.h)

Sets context menu info for the IDefaultFolderMenuInitialize object.

Syntax

HRESULT Initialize(
  [in]           HWND                  hwnd,
  [in, optional] IContextMenuCB        *pcmcb,
  [in, optional] PCIDLIST_ABSOLUTE     pidlFolder,
  [in, optional] IShellFolder          *psf,
  [in]           UINT                  cidl,
  [in]           PCUITEMID_CHILD_ARRAY apidl,
  [in, optional] IUnknown              *punkAssociation,
  [in]           UINT                  cKeys,
  [in, optional] const HKEY            *aKeys
);

Parameters

[in] hwnd

A handle to the shortcut menu.

[in, optional] pcmcb

Type: IContextMenuCB*

The address of the object that defines the callback for the shortcut menu.

[in, optional] pidlFolder

Type: PCIDLIST_ABSOLUTE

The address of an item identifier list that specifies the folder of the items. If NULL, this is computed from the psf parameter.

[in, optional] psf

Type: IShellFolder*

The folder of the items.

[in] cidl

Type: UINT

The count of items in the apidl parameter.

[in] apidl

Type: PCUITEMID_CHILD_ARRAY

A pointer to an array of PIDL structures, each of which is an item to be operated on.

[in, optional] punkAssociation

Type: IUnknown*

The address of an IQueryAssociations object that specifies where to load extensions from.

[in] cKeys

Type: UINT

The count of items in the aKeys parameter. May be zero.

[in, optional] aKeys

Type: const HKEY*

Specifies where to load extensions from.

Return value

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

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header shobjidl_core.h (include Shobjidl.h)

See also

IDefaultFolderMenuInitialize