Registry.PerformanceData

StewartBW 1,830 Reputation points
2024-08-01T23:21:21.9633333+00:00

Hi

Does this field even exist?

https://learn.microsoft.com/en-us/dotnet/api/microsoft.win32.registry.performancedata?view=netframework-4.0

Using the sample code provided I get nothing!

Also, OpenBaseKey applies to LocalMachine only?

The Definition section states LocalMachine only?

https://learn.microsoft.com/en-us/dotnet/api/microsoft.win32.registrykey.openbasekey?view=netframework-4.0

Thanks :)

Developer technologies | VB
Developer technologies | C#
0 comments No comments
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 34,221 Reputation points Microsoft External Staff
    2024-08-02T06:29:30.18+00:00

    Hi @StewartBW ,

    1. For the first sample, the document point out that "Note that this example can often return no results, since there might be no performance data."
    2. The RegistryKey.OpenBaseKey(RegistryHive hive, RegistryView view) method in the .NET Framework is not limited to the RegistryHive.LocalMachine hive. This method can be used to open any of the root registry keys defined in the RegistryHive enumeration, such as ClassesRoot, CurrentUser, LocalMachine, Users, and CurrentConfig.

    Best Regards.

    Jiachen Li


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.