我尝试将KEY_CACHED_INFORMATION结构发送到ZwQueryKey()以接收注册表项数据,但是在输出中我收到访问冲突错误代码 请帮我。 我使用Windows 10
NTSTATUS Status;
WCHAR buffer[1024];
ULONG ReturnLength;
PKEY_CACHED_INFORMATION KeyNameInfo;
KeyNameInfo = (PKEY_CACHED_INFORMATION)&buffer;
wchar_t Bbuffer[1024];
ULONG BReturnLength;
PKEY_CACHED_INFORMATION BKeyNameInfo;
BKeyNameInfo = (PKEY_CACHED_INFORMATION)&Bbuffer;
Status = fnNtQueryKey(KeyHandle, KeyCachedInformation, KeyNameInfo, 1024, &ReturnLength);
Status = fnNtQueryKey(KeyHandle, KeyCachedInformation, BKeyNameInfo, 1024, &BReturnLength);