INameSpaceTreeControlEvents::OnBeforeContextMenu method (shobjidl.h)

Called before a context menu is displayed; allows client to add additional menu entries.

Syntax

HRESULT OnBeforeContextMenu(
  [in, optional] IShellItem *psi,
  [in]           REFIID     riid,
  [out]          void       **ppv
);

Parameters

[in, optional] psi

Type: IShellItem*

A pointer to the IShellItem from which the context menu is generated. This value can be NULL.

[in] riid

Type: REFIID

Reference to the IID of the context menu.

[out] ppv

Type: void**

When this methods returns, contains the address of a pointer to the interface specified by riid.

Return value

Type: HRESULT

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

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header shobjidl.h

See also

INameSpaceTreeControlEvents