diff --git a/src/windows-emulator/syscalls.cpp b/src/windows-emulator/syscalls.cpp index 364dcab0..14e4d8b9 100644 --- a/src/windows-emulator/syscalls.cpp +++ b/src/windows-emulator/syscalls.cpp @@ -236,7 +236,11 @@ namespace syscalls emulator_object>> value_name, KEY_VALUE_INFORMATION_CLASS key_value_information_class, uint64_t key_value_information, ULONG length, emulator_object result_length); - NTSTATUS handle_NtCreateKey(); + NTSTATUS handle_NtCreateKey(const syscall_context& c, emulator_object key_handle, + ACCESS_MASK desired_access, + emulator_object>> object_attributes, + ULONG /*title_index*/, emulator_object>> /*class*/, + ULONG /*create_options*/, emulator_object /*disposition*/); NTSTATUS handle_NtNotifyChangeKey(); NTSTATUS handle_NtSetInformationKey(); NTSTATUS handle_NtEnumerateKey(const syscall_context& c, handle key_handle, ULONG index, diff --git a/src/windows-emulator/syscalls/registry.cpp b/src/windows-emulator/syscalls/registry.cpp index 724d284a..2b219311 100644 --- a/src/windows-emulator/syscalls/registry.cpp +++ b/src/windows-emulator/syscalls/registry.cpp @@ -227,9 +227,21 @@ namespace syscalls return STATUS_NOT_SUPPORTED; } - NTSTATUS handle_NtCreateKey() + NTSTATUS handle_NtCreateKey(const syscall_context& c, const emulator_object key_handle, + const ACCESS_MASK desired_access, + const emulator_object>> object_attributes, + const ULONG /*title_index*/, + const emulator_object>> /*class*/, + const ULONG /*create_options*/, const emulator_object /*disposition*/) { - return STATUS_NOT_SUPPORTED; + const auto result = handle_NtOpenKey(c, key_handle, desired_access, object_attributes); + + if (result == STATUS_OBJECT_NAME_NOT_FOUND) + { + return STATUS_NOT_SUPPORTED; + } + + return result; } NTSTATUS handle_NtNotifyChangeKey()