����
| 38 | |
| 39 | // ���� |
| 40 | NTSTATUS RegistryKey::Create(HANDLE hKeyParent, PUNICODE_STRING keyName, RegistryAccessMask accessMask, |
| 41 | ULONG opts) { |
| 42 | ASSERT(hKeyParent != nullptr); |
| 43 | NTSTATUS status; |
| 44 | ObjectAttributes keyAttr(keyName, ObjectAttributesFlags::KernelHandle | ObjectAttributesFlags::Caseinsensive, |
| 45 | hKeyParent); |
| 46 | HANDLE hKey = nullptr; |
| 47 | status = ZwCreateKey(&hKey, static_cast<ULONG>(accessMask), &keyAttr, 0, nullptr, opts, nullptr); |
| 48 | if (NT_SUCCESS(status)) { |
| 49 | Close(); |
| 50 | _hKey = hKey; |
| 51 | CheckPredefinedKey(); |
| 52 | } |
| 53 | return status; |
| 54 | } |
| 55 | |
| 56 | // �� |
| 57 | NTSTATUS RegistryKey::Open(HANDLE hKeyParent, PUNICODE_STRING keyName, RegistryAccessMask accessMask) { |