IMoniker::CommonPrefixWith

HRESULT IMoniker::CommonPrefixWith(pmkOther, ppmkPrefix)

Answer the longest common prefix that the receiver shares with the moniker pmkOther. This functionality is useful in constructing relative paths, and for performing some of the calculus on monikers needed by the Edit / Links dialog in OLE Documents scenarios.

Argument

Type

Description

pmkOther

IMoniker*

The moniker with whom we are determine the common prefix.

ppmkPrefix

IMoniker*

The place to return the common prefix moniker. NULL is returned only in The case that the common prefix does not exist.

return value

HRESULT

MK_S_ME, indicating that the receiver as a whole is the common prefix. MK_S_HIM, indicating that pmkOther as a whole is the common prefix. MK_S_US, indicating that in fact the two monikers are equal. S_OK, indicating that the common prefix exists but is neither the receiver nor pmkOther. MK_S_NOPREFIX indicating that no common prefix exists.