Re: Find reg key name by handle. by Sergei
Sergei
Sun Dec 09 01:39:14 PST 2007
Thank you, Tim for the reply.
Why do I need? Probably, I don't.
I open the reg key in one code fragment and want to create a report in
another, where
there is no DeviceInfoSet, DeviceInfoData. Probably I shalt carry them...
(I have also an option to enumerate the registry and use full text search...
:-)
I believe
hK = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, ...)
opens different parts of the registry dependent on the KeyType and therefore
SetupDiGetDeviceInstanceId
helps with the device key, not with driver's (please correct me if I'm not
right)
Then, you say, there is no WinAPI method to get the registry key name
by its open handle? Right? Correct?
This was what I gussed and wanted be confirmed.
Thank you once more.
"Tim Roberts" <timr@probo.com> wrote in message
news:5g3nl3l12bl9i563vnh8d4pbgd46haqedd@4ax.com...
> "Sergei V" <sv@a.c.ad.e.m.org> wrote:
>
>>Hello,
>>Could please somebody say if there, in Windows API,
>>is a function to get the registry key name by
>>its open handle (HKey)?
>>
>>I want to get it after successful
>>hK = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, ...)
>>
>>(probably I overlooked something, or there is a better way?
>>Google didn't help me.)
>
> Why do you need this? If you want the PnP ID, you can get that from
> SetupDiGetDeviceInstanceId.
> --
> Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc.