IShellMenu::GetShellFolder method (shobjidl_core.h)

Gets the folder that the menu band is set to browse.

Syntax

HRESULT GetShellFolder(
  [out] DWORD            *pdwFlags,
  [out] PIDLIST_ABSOLUTE *ppidl,
  [in]  REFIID           riid,
  [out] void             **ppv
);

Parameters

[out] pdwFlags

Type: DWORD*

When this method returns successfully, contains a pointer to a set of flag values that specify how the menu band operates.

Can return any of the following flags.

Value Meaning
SMINIT_DEFAULT
No options.
SMINIT_RESTRICT_DRAGDROP
Do not allow drag-and-drop.
SMINIT_TOPLEVEL
This is the top band.
SMINIT_CACHED
Do not destroy the band when the window is closed.
 

Always returns one of the following flags.

Value Meaning
SMINIT_VERTICAL
Specifies a vertical band.
SMINIT_HORIZONTAL
Specifies a horizontal band.

[out] ppidl

Type: PCIDLIST_ABSOLUTE*

When this method returns, contains the address of the folder's fully qualified ITEMIDLIST.

[in] riid

Type: REFIID

The REFIID for the target folder.

[out] ppv

Type: void**

When this method returns successfully, contains the address of a pointer to the Shell folder object referenced by the 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 XP with SP2 [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