Leaked source code of windows server 2003
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.

29 lines
1.1 KiB

  1. // Copyright (c) 1999-2001 Microsoft Corporation, All Rights Reserved
  2. #define WBEM_REG_WBEM "Software\\Microsoft\\WBEM"
  3. #define WBEM_REG_WINMGMT "Software\\Microsoft\\WBEM\\CIMOM"
  4. #define WBEM_REG_AUTORECOVER "Autorecover MOFs"
  5. #define WBEM_REG_AUTORECOVER_EMPTY "Autorecover MOFs (empty)"
  6. #define WBEM_REG_AUTORECOVER_RECOVERED "Autorecover MOFs (recovered)"
  7. #define SYSTEM_SETUP_REG "System\\Setup"
  8. class Registry
  9. {
  10. HKEY hPrimaryKey;
  11. HKEY hSubkey;
  12. int m_nStatus;
  13. LONG m_nLastError;
  14. public:
  15. enum { no_error, failed };
  16. Registry(char *pszLocalMachineStartKey);
  17. ~Registry();
  18. int Open(HKEY hStart, const char *pszStartKey);
  19. int GetStr(const char *pszValueName, char **pValue);
  20. char* GetMultiStr(const char *pszValueName, DWORD &dwSize);
  21. int SetMultiStr(const char *pszValueName, const char*pData, DWORD dwSize);
  22. int DeleteEntry(const char *pszValueName);
  23. int SetStr(char *pszValueName, char *pszValue);
  24. int GetDWORD(TCHAR *pszValueName, DWORD *pdwValue);
  25. int SetDWORDStr(char *pszValueName, DWORD dwValue);
  26. int GetStatus() { return m_nStatus;};
  27. };