|
IOleObject::GetMoniker
Returns a embedded object's moniker, which the caller can use to link to the
object.
HRESULT GetMoniker(
DWORD dwAssign,
| //Specifies how moniker is assigned
| DWORD dwWhichMoniker,
| //Specifies which moniker is assigned
| IMoniker **ppmk
| //Storage of returned pointer
| );
|
|
Parameters
dwAssign
[in] Determines how the moniker is assigned to the object. Depending on the
value of dwAssign, IOleObject::GetMoniker does one of the following:
- Obtains a moniker only if one has already been assigned,
- Forces assignment of a moniker, if necessary, in order to satisfy the call, or
- Obtains a temporary moniker.
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.
dwWhichMoniker
[in] Specifies the form of the moniker being requested. Valid values are taken
from the enumeration OLEWHICHMK.
ppmk
[out] Points to an address where to return the object's moniker. If an error
is returned, this parameter must be set to NULL. Each time an object receives a
call to GetMoniker, it must increase the reference count on the pointer the
method returns. It is the caller's responsibility to call Release when it is done
with the pointer.
Comments
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.
See Also
CreateItemMoniker, IOleClientSite::GetMoniker, IOleObject::SetMoniker, OLEGETMONIKER, OLEWHICHMK
Related LinksSoftware for Delphi and C++ Builder developers Software for Visual Studio .NET developers Software for Visual Basic 6 developers Delphi Tips&Tricks
MegaDetailed.NET
TMS Scripter Studio Pro components for Delphi/C++Builder
More Online Helps Win32 Programmer's Reference (win32.hlp) Win32 Multimedia Programmer's Reference (mmedia.hlp) Microsoft Windows Pen API Programmer's Reference (penapi.hlp) Microsoft Windows Sockets 2 Reference (sock2.hlp) Microsoft Windows Telephony API (TAPI) Programmer's Reference (sock2.hlp) Unix Manual Pages
|