kernel32: Implement GetSystemRegistryQuota as a semi-stub.
This commit is contained in:
parent
fbcf44aa23
commit
43e99d6e0c
@ -630,7 +630,7 @@
|
|||||||
@ stdcall GetSystemDirectoryW(ptr long)
|
@ stdcall GetSystemDirectoryW(ptr long)
|
||||||
@ stdcall GetSystemInfo(ptr)
|
@ stdcall GetSystemInfo(ptr)
|
||||||
@ stdcall GetSystemPowerStatus(ptr)
|
@ stdcall GetSystemPowerStatus(ptr)
|
||||||
# @ stub GetSystemRegistryQuota
|
@ stdcall GetSystemRegistryQuota(ptr ptr)
|
||||||
@ stdcall GetSystemTime(ptr)
|
@ stdcall GetSystemTime(ptr)
|
||||||
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
|
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
|
||||||
@ stdcall GetSystemTimeAsFileTime(ptr)
|
@ stdcall GetSystemTimeAsFileTime(ptr)
|
||||||
|
@ -207,3 +207,19 @@ DWORD WINAPI GetTickCount(void)
|
|||||||
{
|
{
|
||||||
return GetTickCount64();
|
return GetTickCount64();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* GetSystemRegistryQuota (KERNEL32.@)
|
||||||
|
*/
|
||||||
|
BOOL WINAPI GetSystemRegistryQuota(PDWORD pdwQuotaAllowed, PDWORD pdwQuotaUsed)
|
||||||
|
{
|
||||||
|
FIXME("(%p, %p) faking reported quota values\n", pdwQuotaAllowed, pdwQuotaUsed);
|
||||||
|
|
||||||
|
if (pdwQuotaAllowed)
|
||||||
|
*pdwQuotaAllowed = 2 * 1000 * 1000 * 1000; /* 2 GB */
|
||||||
|
|
||||||
|
if (pdwQuotaUsed)
|
||||||
|
*pdwQuotaUsed = 100 * 1000 * 1000; /* 100 MB */
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
@ -56,6 +56,7 @@
|
|||||||
|
|
||||||
static HINSTANCE hkernel32;
|
static HINSTANCE hkernel32;
|
||||||
static void (WINAPI *pGetNativeSystemInfo)(LPSYSTEM_INFO);
|
static void (WINAPI *pGetNativeSystemInfo)(LPSYSTEM_INFO);
|
||||||
|
static BOOL (WINAPI *pGetSystemRegistryQuota)(PDWORD, PDWORD);
|
||||||
static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL);
|
static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL);
|
||||||
static LPVOID (WINAPI *pVirtualAllocEx)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD);
|
static LPVOID (WINAPI *pVirtualAllocEx)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD);
|
||||||
static BOOL (WINAPI *pVirtualFreeEx)(HANDLE, LPVOID, SIZE_T, DWORD);
|
static BOOL (WINAPI *pVirtualFreeEx)(HANDLE, LPVOID, SIZE_T, DWORD);
|
||||||
@ -197,6 +198,7 @@ static int init(void)
|
|||||||
|
|
||||||
hkernel32 = GetModuleHandleA("kernel32");
|
hkernel32 = GetModuleHandleA("kernel32");
|
||||||
pGetNativeSystemInfo = (void *) GetProcAddress(hkernel32, "GetNativeSystemInfo");
|
pGetNativeSystemInfo = (void *) GetProcAddress(hkernel32, "GetNativeSystemInfo");
|
||||||
|
pGetSystemRegistryQuota = (void *) GetProcAddress(hkernel32, "GetSystemRegistryQuota");
|
||||||
pIsWow64Process = (void *) GetProcAddress(hkernel32, "IsWow64Process");
|
pIsWow64Process = (void *) GetProcAddress(hkernel32, "IsWow64Process");
|
||||||
pVirtualAllocEx = (void *) GetProcAddress(hkernel32, "VirtualAllocEx");
|
pVirtualAllocEx = (void *) GetProcAddress(hkernel32, "VirtualAllocEx");
|
||||||
pVirtualFreeEx = (void *) GetProcAddress(hkernel32, "VirtualFreeEx");
|
pVirtualFreeEx = (void *) GetProcAddress(hkernel32, "VirtualFreeEx");
|
||||||
@ -1831,6 +1833,34 @@ static void test_SystemInfo(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_RegistryQuota(void)
|
||||||
|
{
|
||||||
|
BOOL ret;
|
||||||
|
DWORD max_quota, used_quota;
|
||||||
|
|
||||||
|
if (!pGetSystemRegistryQuota)
|
||||||
|
{
|
||||||
|
win_skip("GetSystemRegistryQuota is not available\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = pGetSystemRegistryQuota(NULL, NULL);
|
||||||
|
ok(ret == TRUE,
|
||||||
|
"Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret);
|
||||||
|
|
||||||
|
ret = pGetSystemRegistryQuota(&max_quota, NULL);
|
||||||
|
ok(ret == TRUE,
|
||||||
|
"Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret);
|
||||||
|
|
||||||
|
ret = pGetSystemRegistryQuota(NULL, &used_quota);
|
||||||
|
ok(ret == TRUE,
|
||||||
|
"Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret);
|
||||||
|
|
||||||
|
ret = pGetSystemRegistryQuota(&max_quota, &used_quota);
|
||||||
|
ok(ret == TRUE,
|
||||||
|
"Expected GetSystemRegistryQuota to return TRUE, got %d\n", ret);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(process)
|
START_TEST(process)
|
||||||
{
|
{
|
||||||
int b = init();
|
int b = init();
|
||||||
@ -1856,6 +1886,7 @@ START_TEST(process)
|
|||||||
test_ProcessName();
|
test_ProcessName();
|
||||||
test_Handles();
|
test_Handles();
|
||||||
test_SystemInfo();
|
test_SystemInfo();
|
||||||
|
test_RegistryQuota();
|
||||||
/* things that can be tested:
|
/* things that can be tested:
|
||||||
* lookup: check the way program to be executed is searched
|
* lookup: check the way program to be executed is searched
|
||||||
* handles: check the handle inheritance stuff (+sec options)
|
* handles: check the handle inheritance stuff (+sec options)
|
||||||
|
@ -1755,6 +1755,7 @@ WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
|
|||||||
#define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
|
#define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
|
||||||
WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
|
WINBASEAPI VOID WINAPI GetSystemInfo(LPSYSTEM_INFO);
|
||||||
WINBASEAPI BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
|
WINBASEAPI BOOL WINAPI GetSystemPowerStatus(LPSYSTEM_POWER_STATUS);
|
||||||
|
WINBASEAPI BOOL WINAPI GetSystemRegistryQuota(PDWORD,PDWORD);
|
||||||
WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME);
|
WINBASEAPI VOID WINAPI GetSystemTime(LPSYSTEMTIME);
|
||||||
WINBASEAPI BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
|
WINBASEAPI BOOL WINAPI GetSystemTimeAdjustment(PDWORD,PDWORD,PBOOL);
|
||||||
WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
|
WINBASEAPI VOID WINAPI GetSystemTimeAsFileTime(LPFILETIME);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user