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.

58 lines
1.7 KiB

  1. //////////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // RegistryKey.h
  4. //
  5. // Copyright (C) 2000 Microsoft Corporation. All rights reserved.
  6. //
  7. // Abstract :
  8. //
  9. // This is the definition of the CRegistryKey class.
  10. //
  11. // History :
  12. //
  13. // 05/05/2000 luish Created
  14. //
  15. //////////////////////////////////////////////////////////////////////////////////////////////
  16. #if !defined(__REGISTRYKEY_)
  17. #define __REGISTRYKEY_
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. #include <windows.h>
  22. #include <objbase.h>
  23. #include <stdio.h>
  24. class CRegistryKey
  25. {
  26. public :
  27. CRegistryKey(void);
  28. ~CRegistryKey(void);
  29. STDMETHOD (EnumKeys) (const DWORD dwIndex, LPTSTR strKeyName, LPDWORD lpdwKeyNameLen);
  30. STDMETHOD (CheckForExistingKey) (HKEY hKey, LPCTSTR strKeyName);
  31. STDMETHOD (CreateKey) (HKEY hKey, LPCTSTR strKeyName, const DWORD dwOptions, const REGSAM samDesired, LPDWORD lpdwDisposition);
  32. STDMETHOD (OpenKey) (HKEY hKey, LPCTSTR strKeyName, const REGSAM samDesired);
  33. STDMETHOD (CloseKey) (void);
  34. STDMETHOD (DeleteKey) (HKEY hKey, LPCTSTR strKeyName);
  35. STDMETHOD (EnumValues) (const DWORD dwIndex, LPTSTR strValueName, LPDWORD lpdwValueNameLen, LPDWORD lpdwType, LPBYTE lpData, LPDWORD lpdwDataLen);
  36. STDMETHOD (CheckForExistingValue) (LPCTSTR strValueName);
  37. STDMETHOD (GetValue) (LPCTSTR strValueName, LPDWORD lpdwType, LPBYTE lpData, LPDWORD lpdwDataLen);
  38. STDMETHOD (SetValue) (LPCTSTR strValueName, const DWORD dwType, const BYTE * lpData, const DWORD dwDataLen);
  39. STDMETHOD (DeleteValue) (LPCTSTR strValueName);
  40. private :
  41. BOOL m_fKeyOpen;
  42. HKEY m_hRegistryKey;
  43. };
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif // __REGISTRYKEY_