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.

47 lines
1.3 KiB

  1. //+--------------------------------------------------------------------------
  2. // File: config.h
  3. // Contents: CConfigStorage implements read/write to CA configuration data
  4. // currently stored under HKLM\System\CCS\Services\Certsvc\
  5. // Configuration
  6. //---------------------------------------------------------------------------
  7. namespace CertSrv
  8. {
  9. class CConfigStorage
  10. {
  11. public:
  12. CConfigStorage() :
  13. m_hRemoteHKLM(NULL),
  14. m_hRootConfigKey(NULL),
  15. m_hCAKey(NULL),
  16. m_pwszMachine(NULL) {};
  17. ~CConfigStorage();
  18. HRESULT InitMachine(LPCWSTR pcwszMachine);
  19. HRESULT GetEntry(
  20. LPCWSTR pcwszAuthorityName,
  21. LPCWSTR pcwszRelativeNodePath,
  22. LPCWSTR pcwszValue,
  23. VARIANT *pVariant);
  24. HRESULT SetEntry(
  25. LPCWSTR pwszAuthorityName,
  26. LPCWSTR pcwszRelativeNodePath,
  27. LPCWSTR pwszEntry,
  28. VARIANT *pVariant);
  29. private:
  30. HRESULT InitRootKey();
  31. HRESULT InitCAKey(LPCWSTR pcwszAuthority);
  32. HKEY m_hRemoteHKLM; // HKLM if connecting to remote machine
  33. HKEY m_hRootConfigKey; // HKLM\System\CCS\Services\CertSvc\Configuration
  34. HKEY m_hCAKey; // ...Configuration\CAName
  35. LPWSTR m_pwszMachine;
  36. }; // class CConfigStorage
  37. }; // namespace CertSrv