Ask Learn
Preview
Please sign in to use this experience.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates a URL moniker from a full URL, or from a base context URL moniker and a partial URL.
HRESULT CreateURLMonikerEx(
IMoniker *pMkCtx,
LPCWSTR szURL,
IMoniker **ppmk,
DWORD dwFlags
);
pMkCtx
A pointer to an IMoniker interface of the URL moniker to use as the base context when the szURL parameter is a partial URL string. The pMkCtx parameter can be NULL.
szURL
A string value that contains the URL to be parsed.
ppmk
A pointer to an IMoniker interface for the new URL moniker.
dwFlags
A DWORD value that specifies which URL parser to use. This can be one of the following values.
URL_MK_LEGACY
Use the same URL parser as CreateURLMoniker.
URL_MK_UNIFORM
Use the updated URL parser.
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Use CreateURLMonikerEx with the URL_MK_UNIFORM flag to ensure that a Windows file path and "file://" Uniform Resource Identifier (URI) is interpreted correctly with regard to percent encoded octets, and that the result is equivalent to the input. To correctly extract a Windows file path from the result of CreateURLMonikerEx, use PathCreateFromUrl.
For compatibility reasons, it might be possible to create a URL moniker from an invalid URL; however, such a base moniker cannot be combined with a relative URL. Any attempt to do so will fail with E_INVALIDARG.
Minimum supported client |
Windows XP |
Minimum supported server |
Windows 2000 Server |
Product |
Internet Explorer 5.5 |
Header |
Urlmon.h |
Library |
Urlmon.lib |
DLL |
Urlmon.dll |
Please sign in to use this experience.
Sign in