IMoniker::RelativePathTo

HRESULT IMoniker::RelativePathTo(pmkOther, ppmkRelPath)

Answer a moniker that when composed onto the end of this one or one with a similar structure will yield pmkOther. Conceptually, implementations of this function usually work as follows: the longest prefix that the receiver and pmkOther have is common is determined. This breaks the receiver and pmkOther each into two parts, say (P,T[me]) and (P,T[him]) respectively, where P is the maximal common prefix. The correct relative path result is then .

For any given implementation of this function, it is usually the case that the same pmkOther monikers are treated specially as would be in IMoniker::ComposeWith(). File Monikers, for example, might treat other File Monikers specially in both cases.

See also MonikerRelativePathTo().

Argument

Type

Description

pmkOther

IMoniker*

The moniker to which a relative path should be taken.

ppmkRelPath

IMoniker*

May not be NULL. The place at which the relative path is returned.

return value

HRESULT

MK_S_HIM, indicating that the only form of relative path is in fact just the other moniker, pmkOther. S_OK, indicating that a non-trivial relative path exists.