Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.1 KiB

  1. /*++
  2. Copyright (C) 1999-2001 Microsoft Corporation
  3. Module Name:
  4. PERFNDB.H
  5. Abstract:
  6. History:
  7. --*/
  8. // Use this guy to build a map of index to display name from a localized
  9. // Name Database At this time, it just brute forces a class and a flex
  10. // array, but could be modified to use an STL map just as easily.
  11. #ifndef __PERFNDB_H__
  12. #define __PERFNDB_H__
  13. #include <wbemcomn.h>
  14. #include "adapelem.h"
  15. #include "ntreg.h"
  16. class CPerfNameDb: public CAdapElement
  17. {
  18. public:
  19. CPerfNameDb(HKEY hKey);
  20. ~CPerfNameDb();
  21. HRESULT Init(HKEY hKey);
  22. BOOL IsOk( void )
  23. {
  24. return m_fOk;
  25. }
  26. HRESULT GetDisplayName( DWORD dwIndex, WString& wstrDisplayName );
  27. HRESULT GetDisplayName( DWORD dwIndex, LPCWSTR* ppwcsDisplayName );
  28. HRESULT GetHelpName( DWORD dwIndex, WString& wstrHelpName );
  29. HRESULT GetHelpName( DWORD dwIndex, LPCWSTR* ppwcsHelpName );
  30. //VOID Dump();
  31. private:
  32. // these are the MultiSz Pointers
  33. WCHAR * m_pMultiCounter;
  34. WCHAR * m_pMultiHelp;
  35. // these are the "indexed" pointers
  36. WCHAR ** m_pCounter;
  37. WCHAR ** m_pHelp;
  38. DWORD m_Size;
  39. //
  40. BOOL m_fOk;
  41. };
  42. #endif