다음을 통해 공유


IOleObject::EnumVerbs

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

Thismethodexposes a pull-down menu listing the verbs available for an object in ascending order by verb number.

Syntax

HRESULT EnumVerbs( 
  IEnumOleVerb** ppEnumOleVerb
);

Parameters

  • ppEnumOleVerb
    [out] Address of IEnumOLEVERB* pointer variable that receives the interface pointer to the new enumerator object.

    Each time an object receives a call to EnumVerbs, it must increase the reference count on *ppEnumOleVerb.

    The caller is responsible to call IUnknown::Release when it is done with *ppEnumOleVerb.

    If an error occurs, *ppEnumOleVerb must be set to NULL.

Return Value

One of the values described in the following table is returned.

Value Description

S_OK

Verbs enumerated successfully.

OLE_S_USEREG

Delegate to the default handler to use the entries in the registry to provide the enumeration.

OLEOBJ_E_NOVERBS

Object does not support verbs.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Notes to Callers

Containers call this method to expose a pull-down menu of the verbs available for their embedded objects.

You might want your container to call EnumVerbs every time such a menu is selected to enable such objects as media clips, whose verbs might change while they are running, to update their menus.

The default verb for a media clip, for example, changes from "Play" before it is activated to "Stop" when it is running.

Notes to Implementers

The default handler's implementation of EnumVerbs uses the registry to enumerate an object's verbs.

If an object application is to use the default handler's implementation, it should return OLE_S_USEREG.

The enumeration returned is of type IEnumOLEVERB. This interface provides access to instances of the OLEVERB structure.

Requirements

Header Oleidl.h, oleidl.idl
Library oleaut32.lib, uuid.lib
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

IOleObject
IUnknown::Release
IEnumOLEVERB
OLEVERB
OLEVERBATTRIB

Concepts

Determining Supported COM APIs

Other Resources

AppendMenu