Contents Previous Page Next Page
IHlinkTarget::GetMoniker

Returns a moniker to the hyperlink target object for the given hyperlink destination szLocation.

HRESULT GetMoniker(

    LPCWSTR 
szLocation,             // Hyperlink destination within this target                    
                                                                                                   
    DWORD dwAssign,                 // Whether or not to create a moniker if one not found         
                                                                                                   
    IMoniker  ** ppmkLocation       // Buffer to receive this moniker                              
                                                                                                   
   );                                                                                              
                                                                                                   

Parameters

szLocation

[in, unique] Identifies the hyperlink destination within this target.

dwAssign

[in] A value from the OLEGETMONIKER enumeration. This is typically either OLEGETMONIKER_ONLYIFTHERE, indicating the function should not force a moniker to be created if one does not already exist, or OLEGETMONIKER_FORCEASSIGN, indicating that the function should create a moniker if one does not exist.

ppmkLocation

[out] Pointer to location to return the IMoniker interface pointer to the hyperlink target object for this szLocation.

Return Values

S_OK

The moniker to the hyperlink target object retrieved.

E_FAIL

A moniker does not exist for this hyperlink target and OLEGETMONIKER_ONLYIFTHERE was specified for dwAssign.

CreateFileMoniker, MkParseDisplayName, and other moniker creation API errors

See Also

HlinkSimpleNavigateToMoniker, IHlink::GetMonikerReference, IHlinkSite::GetMoniker