Commit 5c50f658 authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

ntdll: Implement SystemRecommendedSharedDataAlignment class in NtQuerySystemInformation.

parent 7fb74ed9
......@@ -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);
......
......@@ -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();
}
......@@ -826,7 +826,7 @@ typedef enum _SYSTEM_INFORMATION_CLASS {
Unknown55,
Unknown56,
Unknown57,
Unknown58,
SystemRecommendedSharedDataAlignment = 58,
Unknown59,
Unknown60,
Unknown61,
......
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