wininet: Implement IsUrlCacheEntryExpiredW.
This commit is contained in:
parent
6fdec3d501
commit
d155915861
|
@ -2933,6 +2933,43 @@ BOOL WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD dwFlags, FILETIME* pftLas
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLastModified )
|
BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLastModified )
|
||||||
{
|
{
|
||||||
FIXME("(%s, %08x, %p) stub\n", debugstr_w(url), dwFlags, pftLastModified);
|
LPURLCACHE_HEADER pHeader;
|
||||||
return FALSE;
|
CACHEFILE_ENTRY * pEntry;
|
||||||
|
URL_CACHEFILE_ENTRY * pUrlEntry;
|
||||||
|
URLCACHECONTAINER * pContainer;
|
||||||
|
|
||||||
|
TRACE("(%s, %08x, %p)\n", debugstr_w(url), dwFlags, pftLastModified);
|
||||||
|
|
||||||
|
if (!URLCacheContainers_FindContainerW(url, &pContainer))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!URLCacheContainer_OpenIndex(pContainer))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!(pHeader = URLCacheContainer_LockIndex(pContainer)))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (!URLCache_FindEntryInHashW(pHeader, url, &pEntry))
|
||||||
|
{
|
||||||
|
URLCacheContainer_UnlockIndex(pContainer, pHeader);
|
||||||
|
TRACE("entry %s not found!\n", debugstr_w(url));
|
||||||
|
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pEntry->dwSignature != URL_SIGNATURE)
|
||||||
|
{
|
||||||
|
URLCacheContainer_UnlockIndex(pContainer, pHeader);
|
||||||
|
FIXME("Trying to retrieve entry of unknown format %s\n", debugstr_an((LPSTR)&pEntry->dwSignature, sizeof(DWORD)));
|
||||||
|
SetLastError(ERROR_FILE_NOT_FOUND);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
pUrlEntry = (URL_CACHEFILE_ENTRY *)pEntry;
|
||||||
|
|
||||||
|
DosDateTimeToFileTime(pUrlEntry->wExpiredDate, pUrlEntry->wExpiredTime, pftLastModified);
|
||||||
|
|
||||||
|
URLCacheContainer_UnlockIndex(pContainer, pHeader);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue