ok(lpCacheEntryInfo->dwStructSize==sizeof(*lpCacheEntryInfo),"%s: dwStructSize was %d\n",returnedfrom,lpCacheEntryInfo->dwStructSize);
ok(!strcmp(lpCacheEntryInfo->lpszSourceUrlName,TEST_URL),"%s: lpszSourceUrlName should be %s instead of %s\n",returnedfrom,TEST_URL,lpCacheEntryInfo->lpszSourceUrlName);
ok(!strcmp(lpCacheEntryInfo->lpszLocalFileName,filenameA),"%s: lpszLocalFileName should be %s instead of %s\n",returnedfrom,filenameA,lpCacheEntryInfo->lpszLocalFileName);
ok(!strcmp(lpCacheEntryInfo->lpszFileExtension,"html"),"%s: lpszFileExtension should be html instead of %s\n",returnedfrom,lpCacheEntryInfo->lpszFileExtension);
ok(!ret,"RetrieveUrlCacheEntryFile should have failed\n");
ok(GetLastError()==ERROR_INSUFFICIENT_BUFFER,"RetrieveUrlCacheEntryFile should have set last error to ERROR_INSUFFICIENT_BUFFER instead of %d\n",GetLastError());
ok(ret,"RetrieveUrlCacheEntryFile failed with error %d\n",GetLastError());
ok(lpCacheEntryInfo->dwStructSize==sizeof(*lpCacheEntryInfo),"lpCacheEntryInfo->dwStructSize was %d\n",lpCacheEntryInfo->dwStructSize);
ok(!strcmp(lpCacheEntryInfo->lpszSourceUrlName,TEST_URL),"lpCacheEntryInfo->lpszSourceUrlName should be %s instead of %s\n",TEST_URL,lpCacheEntryInfo->lpszSourceUrlName);
ok(!strcmp(lpCacheEntryInfo->lpszLocalFileName,filename),"lpCacheEntryInfo->lpszLocalFileName should be %s instead of %s\n",filename,lpCacheEntryInfo->lpszLocalFileName);
ok(!strcmp(lpCacheEntryInfo->lpszFileExtension,"html"),"lpCacheEntryInfo->lpszFileExtension should be html instead of %s\n",lpCacheEntryInfo->lpszFileExtension);
HeapFree(GetProcessHeap(),0,lpCacheEntryInfo);
ret=UnlockUrlCacheEntryFile(TEST_URL,0);
ok(ret,"UnlockUrlCacheEntryFile failed with error %d\n",GetLastError());
ok(!ret,"GetUrlCacheEntryInfoEx with NULL URL and NULL args should have failed\n");
ok(GetLastError()==ERROR_INVALID_PARAMETER,"GetUrlCacheEntryInfoEx with NULL URL and NULL args should have set last error to ERROR_INVALID_PARAMETER instead of %d\n",GetLastError());
ok(!ret,"GetUrlCacheEntryInfoEx with zero-length buffer should fail\n");
ok(GetLastError()==ERROR_INSUFFICIENT_BUFFER,"GetUrlCacheEntryInfoEx should have set last error to ERROR_INSUFFICIENT_BUFFER instead of %d\n",GetLastError());
ok(!ret,"RetrieveUrlCacheEntryFile should have failed\n");
ok(GetLastError()==ERROR_INSUFFICIENT_BUFFER,"RetrieveUrlCacheEntryFile should have set last error to ERROR_INSUFFICIENT_BUFFER instead of %d\n",GetLastError());