ntdll: Implement SystemRecommendedSharedDataAlignment class in NtQuerySystemInformation.

Signed-off-by: Michael Müller <michael@fds-team.de>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Müller 2016-02-12 08:37:32 +01:00 committed by Alexandre Julliard
parent 7fb74ed945
commit 5c50f65830
3 changed files with 28 additions and 1 deletions

View File

@ -2317,6 +2317,17 @@ NTSTATUS WINAPI NtQuerySystemInformation(
RtlFreeHeap(GetProcessHeap(), 0, buf);
}
break;
case SystemRecommendedSharedDataAlignment:
{
len = sizeof(DWORD);
if (Length >= len)
{
if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION;
else *((DWORD *)SystemInformation) = 64;
}
else ret = STATUS_INFO_LENGTH_MISMATCH;
}
break;
default:
FIXME("(0x%08x,%p,0x%08x,%p) stub\n",
SystemInformationClass,SystemInformation,Length,ResultLength);

View File

@ -1984,6 +1984,19 @@ static void test_thread_start_address(void)
CloseHandle(thread);
}
static void test_query_data_alignment(void)
{
ULONG ReturnLength;
NTSTATUS status;
DWORD value;
value = 0xdeadbeef;
status = pNtQuerySystemInformation(SystemRecommendedSharedDataAlignment, &value, sizeof(value), &ReturnLength);
ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
ok(sizeof(value) == ReturnLength, "Inconsistent length %u\n", ReturnLength);
ok(value == 64, "Expected 64, got %u\n", value);
}
START_TEST(info)
{
char **argv;
@ -2116,4 +2129,7 @@ START_TEST(info)
trace("Starting test_thread_start_address()\n");
test_thread_start_address();
trace("Starting test_query_data_alignment()\n");
test_query_data_alignment();
}

View File

@ -826,7 +826,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
Unknown55,
Unknown56,
Unknown57,
Unknown58,
SystemRecommendedSharedDataAlignment = 58,
Unknown59,
Unknown60,
Unknown61,