ntstatus.h says
#define STATUS_OBJECT_NAME_NOT_FOUND ((NTSTATUS)0xC0000034L)
are u sure you are passing in the name of the object correctly?
On 6/21/07, Andrey Kamchatnikov wrote:
>
>
> Hi,
>
> I have a problem with ZwQueryValueKey function,
>
> status = ZwQueryValueKey(hkey, &valname, KeyValuePartialInformation,
> &value, sizeof(value), &junk);
>
> status=c0000034;
>
> Have someone any idea what I’m doing wrong?
>
> Here is the peace of the code:
>
> HANDLE hkey;
>
> status = IoOpenDeviceRegistryKey(pdo, PLUGPLAY_REGKEY_DEVICE, KEY_READ,
> &hkey);
>
> DbgPrint(“IoOpenDeviceRegistryKey:%08x\n”,status);
>
>
> UNICODE_STRING valname;
>
> RtlInitUnicodeString(&valname, L"CardNum");
>
> DbgPrint(“ZwQueryValueKey valname = %wZ”, &valname);
>
>
> KEY_VALUE_PARTIAL_INFORMATION value;
>
> ULONG junk;
>
>
> status = ZwQueryValueKey(hkey, &valname, KeyValuePartialInformation,
> &value, sizeof(value), &junk);
>
> DbgPrint(“ZwQueryValueKey:%08x\n”,status);
>
> ULONG Type = *(PULONG) value.Data;
>
> DbgPrint(“ZwQueryValueKey:%08x\n”,Type);
>
> ZwClose(hkey);
>
> Thank you,
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
–
- amitr0