getting handle to HKLM\Hardware\DEVICEMAP

How do I create an ObjectAttributes structure with the root Handle pointing
to HKLM\Hardware\DeviceMap?

thanks,

daniel

You must have valid HANDLE DeviceMapKeyHandle obtained from ZwCreateKey
or ZwOpenKey.

// opening HKLM\Hardware\DEVICEMAP
RtlInitUnicodeString(&Name,
L"\Registry\Machine\Hardware\DeviceMap");
InitializeObjectAttributes(&ObjAttr, &Name, OBJ_CASE_INSENSITIVE, NULL,
NULL);
Status = ZwOpenKey(&DeviceMapKeyHandle, KEY_ALL_ACCESS, &ObjAttr);

Then you can do your task like in the following code.

// opening HKLM\Hardware\DEVICEMAP\Scsi\Scsi Port 0
RtlInitializeObjectAttributes(&Name, L"Scsi\Scsi Port 0");
InitializeObjectAttributes(&ObjAttr, &Name, OBJ_CASE_INSENSITIVE,
DeviceMapKeyHandle, NULL);

Hope this helps
Paul

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Nemiroff, Daniel
Sent: Wednesday, October 11, 2000 5:59 PM
To: NT Developers Interest List
Subject: [ntdev] getting handle to HKLM\Hardware\DEVICEMAP

How do I create an ObjectAttributes structure with the root Handle
pointing
to HKLM\Hardware\DeviceMap?

thanks,

daniel


You are currently subscribed to ntdev as: xxxxx@compelson.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

> How do I create an ObjectAttributes structure with the root Handle
pointing

to HKLM\Hardware\DeviceMap?

\Registry\Machine\Hardware\DeviceMap

Max