Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
43e99d6e
Commit
43e99d6e
authored
Oct 11, 2010
by
Andrew Nguyen
Committed by
Alexandre Julliard
Oct 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement GetSystemRegistryQuota as a semi-stub.
parent
fbcf44aa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
1 deletion
+49
-1
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-1
kernel_main.c
dlls/kernel32/kernel_main.c
+16
-0
process.c
dlls/kernel32/tests/process.c
+31
-0
winbase.h
include/winbase.h
+1
-0
No files found.
dlls/kernel32/kernel32.spec
View file @
43e99d6e
...
...
@@ -630,7 +630,7 @@
@ stdcall GetSystemDirectoryW(ptr long)
@ stdcall GetSystemInfo(ptr)
@ stdcall GetSystemPowerStatus(ptr)
# @ stub GetSystemRegistryQuota
@ stdcall GetSystemRegistryQuota(ptr ptr)
@ stdcall GetSystemTime(ptr)
@ stdcall GetSystemTimeAdjustment(ptr ptr ptr)
@ stdcall GetSystemTimeAsFileTime(ptr)
...
...
dlls/kernel32/kernel_main.c
View file @
43e99d6e
...
...
@@ -207,3 +207,19 @@ DWORD WINAPI GetTickCount(void)
{
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
;
}
dlls/kernel32/tests/process.c
View file @
43e99d6e
...
...
@@ -56,6 +56,7 @@
static
HINSTANCE
hkernel32
;
static
void
(
WINAPI
*
pGetNativeSystemInfo
)(
LPSYSTEM_INFO
);
static
BOOL
(
WINAPI
*
pGetSystemRegistryQuota
)(
PDWORD
,
PDWORD
);
static
BOOL
(
WINAPI
*
pIsWow64Process
)(
HANDLE
,
PBOOL
);
static
LPVOID
(
WINAPI
*
pVirtualAllocEx
)(
HANDLE
,
LPVOID
,
SIZE_T
,
DWORD
,
DWORD
);
static
BOOL
(
WINAPI
*
pVirtualFreeEx
)(
HANDLE
,
LPVOID
,
SIZE_T
,
DWORD
);
...
...
@@ -197,6 +198,7 @@ static int init(void)
hkernel32
=
GetModuleHandleA
(
"kernel32"
);
pGetNativeSystemInfo
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetNativeSystemInfo"
);
pGetSystemRegistryQuota
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"GetSystemRegistryQuota"
);
pIsWow64Process
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"IsWow64Process"
);
pVirtualAllocEx
=
(
void
*
)
GetProcAddress
(
hkernel32
,
"VirtualAllocEx"
);
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
)
{
int
b
=
init
();
...
...
@@ -1856,6 +1886,7 @@ START_TEST(process)
test_ProcessName
();
test_Handles
();
test_SystemInfo
();
test_RegistryQuota
();
/* things that can be tested:
* lookup: check the way program to be executed is searched
* handles: check the handle inheritance stuff (+sec options)
...
...
include/winbase.h
View file @
43e99d6e
...
...
@@ -1755,6 +1755,7 @@ WINBASEAPI UINT WINAPI GetSystemDirectoryW(LPWSTR,UINT);
#define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
WINBASEAPI
VOID
WINAPI
GetSystemInfo
(
LPSYSTEM_INFO
);
WINBASEAPI
BOOL
WINAPI
GetSystemPowerStatus
(
LPSYSTEM_POWER_STATUS
);
WINBASEAPI
BOOL
WINAPI
GetSystemRegistryQuota
(
PDWORD
,
PDWORD
);
WINBASEAPI
VOID
WINAPI
GetSystemTime
(
LPSYSTEMTIME
);
WINBASEAPI
BOOL
WINAPI
GetSystemTimeAdjustment
(
PDWORD
,
PDWORD
,
PBOOL
);
WINBASEAPI
VOID
WINAPI
GetSystemTimeAsFileTime
(
LPFILETIME
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment