C
charles
RegistryKey.GetValue does not work if you access
HKEY_PERFORMANCE_DATA on a remote machine, e.g.:
RegistryKey perfKey = RegistryKey.OpenRemoteBaseKey
(RegistryHive.PerformanceData, "machinename");
byte[] perfData = (byte[])perfKey.GetValue("Global");
This never returns any data, i.e. perfData is always null.
This happens because RegistryKey.InternalGetValue treats
performance data as a special case. The test is something
like:
if (this.hKey == HKEY_PERFORMANCE_DATA)
// Do special case
Of course, this test only succeeds for local performance
data, not remote performance data.
A workaround for this and a fix in the next release would
be very much appreciated.
Cheers,
Charles
P.S. I'm posting this again because I've registered since
I last posted it.
HKEY_PERFORMANCE_DATA on a remote machine, e.g.:
RegistryKey perfKey = RegistryKey.OpenRemoteBaseKey
(RegistryHive.PerformanceData, "machinename");
byte[] perfData = (byte[])perfKey.GetValue("Global");
This never returns any data, i.e. perfData is always null.
This happens because RegistryKey.InternalGetValue treats
performance data as a special case. The test is something
like:
if (this.hKey == HKEY_PERFORMANCE_DATA)
// Do special case
Of course, this test only succeeds for local performance
data, not remote performance data.
A workaround for this and a fix in the next release would
be very much appreciated.
Cheers,
Charles
P.S. I'm posting this again because I've registered since
I last posted it.