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.

57 lines
1.4 KiB

  1. #pragma once
  2. // ---------------------------------------------------------------------------
  3. // CRegEmit
  4. // ---------------------------------------------------------------------------
  5. class CRegEmit
  6. {
  7. private:
  8. HRESULT _hr;
  9. HKEY _hBaseKey;
  10. CRegEmit();
  11. public:
  12. ~CRegEmit();
  13. HRESULT WriteDword(LPCWSTR pwzValue, DWORD dwData);
  14. HRESULT WriteString(LPCWSTR pwzValue, CString &sData );
  15. HRESULT WriteString(LPCWSTR pwzValue, LPCWSTR pwzData, DWORD ccData = 0);
  16. HRESULT DeleteKey(LPCWSTR pwzSubKey);
  17. static HRESULT Create(CRegEmit **ppEmit, LPCWSTR pwzRelKeyPath, CRegEmit *pParentEmit = NULL);
  18. };
  19. // ---------------------------------------------------------------------------
  20. // CRegImport
  21. // ---------------------------------------------------------------------------
  22. class CRegImport
  23. {
  24. private:
  25. HRESULT _hr;
  26. HKEY _hBaseKey;
  27. CRegImport();
  28. public:
  29. ~CRegImport();
  30. HRESULT Check(LPCWSTR pwzValue, BOOL &bExist);
  31. HRESULT ReadDword(LPCWSTR pwzValue, LPDWORD pdwData);
  32. HRESULT ReadString(LPCWSTR pwzValue, CString &sData);
  33. HRESULT EnumKeys(DWORD n, CString &sKey);
  34. HRESULT EnumKeys(DWORD n, CRegImport **ppImport);
  35. static HRESULT Create(CRegImport **ppImport, LPCWSTR pwzRelKeyPath, CRegImport *pParentImport = NULL);
  36. static HRESULT Create(CRegImport **ppImport, LPCWSTR pwzRelKeyPath, HKEY hkeyRoot);
  37. };