S
Shalini
My ZwOpenKey does not succeeed at all.. It succeeds only when the parameter
passes is
\\Registry\\Machine\\System and its subtreee
if its \\Registry\\machine\\software it does not succeeed at ll..
Actually i want to obtain one registry key called SystemRoot from
HKLM\SOFTWARE\\MICROSOFT\\WINDOWS NT \\CURRENTVERSION
TO have that i open the above key as
\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion
But it gives an error saying ERROR_FILE_NOT_FOUND (Win32 Error code=2)
Does it mean that Registry keys under SYSTEM can only be accessed
I am writing the code in DriverEntry function..
Code snippet:
OBJECT_ATTRIBUTES oa;
RtlInitUnicodeString(&RegistryPath1,
L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion");
InitializeObjectAttributes(&oa,RegistryPath1,OBJ_KERNEL_HANDLE|OBJ_CASE_INSE
NSITIVE,NULL,NULL);
HANDLE hKey=NULL;
NTSTATUS rc=ZwOpenKey(&hKey,KEY_READ,&oa);
if(NT_SUCCESS(rc))
{
ZwClose(hKey);
}
Expecting ur reply.
Regards,
Shal
passes is
\\Registry\\Machine\\System and its subtreee
if its \\Registry\\machine\\software it does not succeeed at ll..
Actually i want to obtain one registry key called SystemRoot from
HKLM\SOFTWARE\\MICROSOFT\\WINDOWS NT \\CURRENTVERSION
TO have that i open the above key as
\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion
But it gives an error saying ERROR_FILE_NOT_FOUND (Win32 Error code=2)
Does it mean that Registry keys under SYSTEM can only be accessed
I am writing the code in DriverEntry function..
Code snippet:
OBJECT_ATTRIBUTES oa;
RtlInitUnicodeString(&RegistryPath1,
L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion");
InitializeObjectAttributes(&oa,RegistryPath1,OBJ_KERNEL_HANDLE|OBJ_CASE_INSE
NSITIVE,NULL,NULL);
HANDLE hKey=NULL;
NTSTATUS rc=ZwOpenKey(&hKey,KEY_READ,&oa);
if(NT_SUCCESS(rc))
{
ZwClose(hKey);
}
Expecting ur reply.
Regards,
Shal