diff --git a/reactos/ntoskrnl/config/ntapi.c b/reactos/ntoskrnl/config/ntapi.c index 7a10d14bfc3..b47f77ffd49 100644 --- a/reactos/ntoskrnl/config/ntapi.c +++ b/reactos/ntoskrnl/config/ntapi.c @@ -39,6 +39,9 @@ NtCreateKey(OUT PHANDLE KeyHandle, ObjectAttributes->ObjectName, ObjectAttributes->RootDirectory, DesiredAccess, CreateOptions); + /* Ignore the WOW64 flag, it's not valid in the kernel */ + DesiredAccess &= ~KEY_WOW64_RES; + /* Check for user-mode caller */ if (PreviousMode != KernelMode) { @@ -126,6 +129,9 @@ NtOpenKey(OUT PHANDLE KeyHandle, DPRINT("NtOpenKey(Path: %wZ, Root %x, Access: %x)\n", ObjectAttributes->ObjectName, ObjectAttributes->RootDirectory, DesiredAccess); + /* Ignore the WOW64 flag, it's not valid in the kernel */ + DesiredAccess &= ~KEY_WOW64_RES; + /* Check for user-mode caller */ if (PreviousMode != KernelMode) {