Retrieves an embedded object's moniker, which the caller can use to link to the object.
HRESULT GetMoniker(
DWORD dwAssign, //Specifies how moniker is assigned to object
DWORD dwWhichMoniker,
//Specifies which moniker is assigned
IMoniker **ppmk //Address of output variable that receives the
// IMoniker interface pointer
);
Values for dwAssign are specified in the enumeration OLEGETMONIKER.
Note You cannot pass OLEGETMONIKER_UNASSIGN when calling IOleObject::GetMoniker. This value is valid only when calling IOleClientSite::GetMoniker.
The IOleObject::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 IOleObject::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.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in oleidl.h.
CreateItemMoniker, IOleClientSite::GetMoniker, IOleObject::SetMoniker, OLEGETMONIKER, OLEWHICHMK