Creates an URL moniker from either a full URL string or from a base context URL moniker and a partial URL string.
HRESULT CreateURLMoniker(
IMoniker *pmkContext, //Pointer to the base context moniker
LPWSTR szURL, //Display name to be parsed
IMoniker **ppmk //Address of output variable that receives
// the IMoniker interface pointer
);
Partial URLs are similar to relative paths within file systems, in that resolution to an object requires a context outside the partial string alone. Full URL strings are like fully-qualified paths; they are self-contained and often location-independent.
When creating an URL moniker from a partial URL string specified in szURL, the caller can specify a context with a partial URL moniker in the pmkContext parameter. In this case, the CreateURLMoniker function retrieves the display name of pmkContext (by calling the IMoniker::GetDisplayName method) and manually composes it with szURL according to URL composition rules.
The caller can alternately create a moniker from a partial URL string when the pmkContext parameter is set to NULL. In this case, the resulting moniker obtains further context during binding (either through IMoniker::BindToObject or IMoniker::BindToStorage). The moniker goes through the following steps to obtain the additional context:
IBindCtx::GetObjectParam(SZ_URLCONTEXT, (IUnknown**)&pmkContext)
Windows NT: Use version 5.0 or later.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in urlmon.h.