Provides a moniker that, when composed onto the end of the first specified moniker (or one with a similar structure), yields the second specified moniker. This function is intended for use only by IMoniker::RelativePathTo implementations.
WINOLEAPI MonikerRelativePathTo(
LPMONIKER pmkSrc, //Pointer to the source identified by the
// moniker
LPMONIKER pmkDest, //Pointer to the destination identified by the
// moniker
LPMONIKER FAR * ppmkRelPath,
//Address of output variable that receives the
// IMoniker interface pointer
BOOL dwReserved //Reserved; must be non-zero
);
This function supports the standard return value E_INVALIDARG, E_OUTOFMEMORY, and E_UNEXPECTED, as well as the following:
Call MonikerRelativePathTo only in the implementation of IMoniker::RelativePathTo if you are implementing a new moniker class.
Your implementation of IMoniker::RelativePathTo should first check whether the other moniker is of a type you recognize and handle in a special way. If not, you should call MonikerRelativePathTo, passing itself as pmkThis and the other moniker as pmkOther. MonikerRelativePathTo correctly handles the cases where either moniker is a generic composite.
You should call this function only if pmkSrc and pmkDest are both absolute monikers, where an absolute moniker is either a file moniker or a generic composite whose leftmost component is a file moniker, and where the file moniker represents an absolute path. Do not call this function on relative monikers.
Windows NT: Use version 3.1 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in objbase.h.
Import Library: Included as a resource in ole32.dll.