Commit f0cd3de5 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

wininet: Change type of cache limit and usage to large integers.

parent 22f920df
...@@ -154,12 +154,9 @@ typedef struct _URLCACHE_HEADER ...@@ -154,12 +154,9 @@ typedef struct _URLCACHE_HEADER
DWORD dwIndexCapacityInBlocks; DWORD dwIndexCapacityInBlocks;
DWORD dwBlocksInUse; DWORD dwBlocksInUse;
DWORD dwUnknown1; DWORD dwUnknown1;
DWORD dwCacheLimitLow; ULARGE_INTEGER CacheLimit;
DWORD dwCacheLimitHigh; ULARGE_INTEGER CacheUsage;
DWORD dwCacheUsageLow; ULARGE_INTEGER ExemptUsage;
DWORD dwCacheUsageHigh;
DWORD dwExemptUsageLow;
DWORD dwExemptUsageHigh;
DWORD DirectoryCount; /* number of directory_data's */ DWORD DirectoryCount; /* number of directory_data's */
DIRECTORY_DATA directory_data[1]; /* first directory entry */ DIRECTORY_DATA directory_data[1]; /* first directory entry */
} URLCACHE_HEADER, *LPURLCACHE_HEADER; } URLCACHE_HEADER, *LPURLCACHE_HEADER;
...@@ -312,8 +309,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) ...@@ -312,8 +309,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer)
pHeader->dwFileSize = dwFileSize; pHeader->dwFileSize = dwFileSize;
pHeader->dwIndexCapacityInBlocks = NEWFILE_NUM_BLOCKS; pHeader->dwIndexCapacityInBlocks = NEWFILE_NUM_BLOCKS;
/* 127MB - taken from default for Windows 2000 */ /* 127MB - taken from default for Windows 2000 */
pHeader->dwCacheLimitHigh = 0; pHeader->CacheLimit.QuadPart = 0x07ff5400;
pHeader->dwCacheLimitLow = 0x07ff5400;
/* Copied from a Windows 2000 cache index */ /* Copied from a Windows 2000 cache index */
pHeader->DirectoryCount = 4; pHeader->DirectoryCount = 4;
...@@ -328,8 +324,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer) ...@@ -328,8 +324,7 @@ static DWORD URLCacheContainer_OpenIndex(URLCACHECONTAINER * pContainer)
(BYTE *) &dw, &len) == ERROR_SUCCESS && (BYTE *) &dw, &len) == ERROR_SUCCESS &&
keytype == REG_DWORD) keytype == REG_DWORD)
{ {
pHeader->dwCacheLimitHigh = (dw >> 22); pHeader->CacheLimit.QuadPart = (ULONGLONG)dw * 1024;
pHeader->dwCacheLimitLow = dw << 10;
} }
RegCloseKey(key); RegCloseKey(key);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment