urlmon: Added CoInternetQueryInfo implementation.

This commit is contained in:
Jacek Caban 2007-12-28 01:59:25 +01:00 committed by Alexandre Julliard
parent c19fb7f011
commit 7d223172c5
2 changed files with 46 additions and 20 deletions

View File

@ -254,3 +254,47 @@ HRESULT WINAPI CoInternetCompareUrl(LPCWSTR pwzUrl1, LPCWSTR pwzUrl2, DWORD dwCo
return UrlCompareW(pwzUrl1, pwzUrl2, dwCompareFlags) ? S_FALSE : S_OK;
}
/***********************************************************************
* CoInternetQueryInfo (URLMON.@)
*
* Retrieves information relevant to a specified URL
*
*/
HRESULT WINAPI CoInternetQueryInfo(LPCWSTR pwzUrl, QUERYOPTION QueryOption,
DWORD dwQueryFlags, LPVOID pvBuffer, DWORD cbBuffer, DWORD *pcbBuffer,
DWORD dwReserved)
{
IInternetProtocolInfo *protocol_info;
HRESULT hres;
TRACE("(%s, %x, %x, %p, %x, %p, %x): stub\n", debugstr_w(pwzUrl),
QueryOption, dwQueryFlags, pvBuffer, cbBuffer, pcbBuffer, dwReserved);
protocol_info = get_protocol_info(pwzUrl);
if(protocol_info) {
hres = IInternetProtocolInfo_QueryInfo(protocol_info, pwzUrl, QueryOption, dwQueryFlags,
pvBuffer, cbBuffer, pcbBuffer, dwReserved);
IInternetProtocolInfo_Release(protocol_info);
return SUCCEEDED(hres) ? hres : E_FAIL;
}
switch(QueryOption) {
case QUERY_USES_NETWORK:
if(!pvBuffer || cbBuffer < sizeof(DWORD))
return E_FAIL;
*(DWORD*)pvBuffer = 0;
if(pcbBuffer)
*pcbBuffer = sizeof(DWORD);
break;
default:
FIXME("Not supported option %d\n", QueryOption);
return E_NOTIMPL;
}
return S_OK;
}

View File

@ -1125,26 +1125,6 @@ HRESULT WINAPI CreateURLMoniker(IMoniker *pmkContext, LPCWSTR szURL, IMoniker **
return CreateURLMonikerEx(pmkContext, szURL, ppmk, URL_MK_LEGACY);
}
/***********************************************************************
* CoInternetQueryInfo (URLMON.@)
*
* Retrieves information relevant to a specified URL
*
* RETURNS
* S_OK success
* S_FALSE buffer too small
* INET_E_QUERYOPTIONUNKNOWN invalid option
*
*/
HRESULT WINAPI CoInternetQueryInfo(LPCWSTR pwzUrl, QUERYOPTION QueryOption,
DWORD dwQueryFlags, LPVOID pvBuffer, DWORD cbBuffer, DWORD * pcbBuffer,
DWORD dwReserved)
{
FIXME("(%s, %x, %x, %p, %x, %p, %x): stub\n", debugstr_w(pwzUrl),
QueryOption, dwQueryFlags, pvBuffer, cbBuffer, pcbBuffer, dwReserved);
return S_OK;
}
/***********************************************************************
* IsAsyncMoniker (URLMON.@)
*/
@ -1184,6 +1164,8 @@ HRESULT WINAPI BindAsyncMoniker(IMoniker *pmk, DWORD grfOpt, IBindStatusCallback
LPBC pbc = NULL;
HRESULT hr = E_INVALIDARG;
TRACE("(%p %08x %p %s %p)\n", pmk, grfOpt, pbsc, debugstr_guid(iidResult), ppvResult);
if (pmk && ppvResult)
{
*ppvResult = NULL;