urlmon: Added HlinkParseDisplayNameEx implementation.
This commit is contained in:
parent
254000dc99
commit
60b0539c87
|
@ -95,9 +95,26 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
|
|||
if(pclsid)
|
||||
*pclsid = clsid;
|
||||
|
||||
if(!ret)
|
||||
return S_OK;
|
||||
|
||||
return CoGetClassObject(&clsid, CLSCTX_INPROC_SERVER, NULL, &IID_IClassFactory, (void**)ret);
|
||||
}
|
||||
|
||||
BOOL is_registered_protocol(LPCWSTR url)
|
||||
{
|
||||
DWORD schema_len;
|
||||
WCHAR schema[64];
|
||||
HRESULT hres;
|
||||
|
||||
hres = CoInternetParseUrl(url, PARSE_SCHEMA, 0, schema, sizeof(schema)/sizeof(schema[0]),
|
||||
&schema_len, 0);
|
||||
if(FAILED(hres))
|
||||
return FALSE;
|
||||
|
||||
return get_protocol_cf(schema, schema_len, NULL, NULL) == S_OK;
|
||||
}
|
||||
|
||||
IInternetProtocolInfo *get_protocol_info(LPCWSTR url)
|
||||
{
|
||||
IInternetProtocolInfo *ret = NULL;
|
||||
|
|
|
@ -1185,6 +1185,27 @@ HRESULT WINAPI BindAsyncMoniker(IMoniker *pmk, DWORD grfOpt, IBindStatusCallback
|
|||
return hr;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* MkParseDisplayNameEx (URLMON.@)
|
||||
*/
|
||||
HRESULT WINAPI MkParseDisplayNameEx(IBindCtx *pbc, LPCWSTR szDisplayName, ULONG *pchEaten, LPMONIKER *ppmk)
|
||||
{
|
||||
TRACE("(%p %s %p %p)\n", pbc, debugstr_w(szDisplayName), pchEaten, ppmk);
|
||||
|
||||
if(is_registered_protocol(szDisplayName)) {
|
||||
HRESULT hres;
|
||||
|
||||
hres = CreateURLMoniker(NULL, szDisplayName, ppmk);
|
||||
if(SUCCEEDED(hres)) {
|
||||
*pchEaten = strlenW(szDisplayName);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
|
||||
return MkParseDisplayName(pbc, szDisplayName, pchEaten, ppmk);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* URLDownloadToFileA (URLMON.@)
|
||||
*
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
@ stub IsLoggingEnabledA
|
||||
@ stub IsLoggingEnabledW
|
||||
@ stdcall IsValidURL(ptr wstr long)
|
||||
@ stdcall MkParseDisplayNameEx(ptr ptr ptr ptr) ole32.MkParseDisplayName
|
||||
@ stdcall MkParseDisplayNameEx(ptr wstr ptr ptr)
|
||||
@ stdcall ObtainUserAgentString(long str ptr)
|
||||
@ stub PrivateCoInstall
|
||||
@ stdcall RegisterBindStatusCallback(ptr ptr ptr long)
|
||||
|
|
|
@ -67,6 +67,7 @@ void UMCloseCacheFileStream(IUMCacheStream *pstr);
|
|||
|
||||
IInternetProtocolInfo *get_protocol_info(LPCWSTR url);
|
||||
HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret);
|
||||
BOOL is_registered_protocol(LPCWSTR);
|
||||
|
||||
HRESULT bind_to_storage(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
|
||||
HRESULT bind_to_object(IMoniker *mon, LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
|
||||
|
|
Loading…
Reference in New Issue