Freigeben über


IOleObject::GetMoniker (Windows CE 5.0)

Send Feedback

This method retrieves an embedded object's moniker, which the caller can use to link to the object.

HRESULT GetMoinker( DWORD dwAssign, DWORDdwWhichMoniker, IMoniker** ppmk );

Parameters

  • dwAssign
    [in] Determines how the moniker is assigned to the object. Depending on the value of dwAssign, GetMoniker does one of the following:

    • Obtains a moniker only if one has been assigned
    • Forces assignment of a moniker, if necessary, to satisfy the call
    • Obtains a temporary moniker

    Values for dwAssign are specified in the enumeration OLEGETMONIKER.

  • dwWhichMoniker
    [in] Specifies the form of the moniker being requested.

    Valid values are taken from the enumeration OLEWHICHMK.

  • ppmk
    [out] Address of IMoniker* pointer variable that receives the interface pointer to the object's moniker.

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

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

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

Remarks

You cannot pass OLEGETMONIKER_UNASSIGN when calling GetMoniker. This value is valid only when calling IOleClientSite::GetMoniker.

The GetMoniker method returns an object's moniker. Like IOleObject::SetMoniker, this method is important only in the context of managing links to embedded objects and even in that case is optional. A potential link client that requires an object's moniker to bind to the object can call this method to obtain that moniker.

The default implementation of GetMoniker calls the IOleClientSite::GetMoniker, returning E_UNEXPECTED if the object is not running or does not have a valid pointer to a client site.

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

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Oleidl.h, Oleidl.idl.
Link Library: Oleaut32.lib, Uuid.lib.

See Also

IOleObject | Determining Supported COM APIs | IOleClientSite::GetMoniker | IOleObject::SetMoniker | IMoniker | IUnknown::Release | OLEGETMONIKER | OLEWHICHMK

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.