home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / C_C++ / VisualProgrammingArmoury / data1.cab / MyFileGroup / INCLUDE / Registry.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-06-23  |  1.5 KB  |  52 lines

  1. #ifndef _INC_REGISTRY_HPP
  2. #define _INC_REGISTRY_HPP
  3. #ifdef __GNUG__
  4.  
  5. #ifdef BUILD_TCCORE
  6. #define TCCORELIB    dllexport
  7. #else
  8. #ifdef BUILD_LOCAL
  9. #define TCCORELIB
  10. #else
  11. #define TCCORELIB    dllimport
  12. #endif
  13. #endif
  14.  
  15. #else
  16.  
  17. #ifdef BUILD_TCCORE
  18. #define TCCORELIB    __declspec(dllexport)
  19. #else
  20. #ifdef BUILD_LOCAL
  21. #define TCCORELIB
  22. #else
  23. #define TCCORELIB    __declspec(dllimport)
  24. #endif
  25. #endif
  26.  
  27. #endif
  28. TCCORELIB HKEY tcReg_OpenKey (HKEY k, LPCSTR path)  ;
  29. TCCORELIB void tcReg_SetValue (HKEY hkey, LPCSTR name, LPCSTR val)  ;
  30. TCCORELIB BOOL tcReg_NextValue (HKEY hkey, int num, TC_CString &name, TC_CString &val)  ;
  31.  
  32. // **********************************************************************
  33. class TCCORELIB TC_CRegistry 
  34. {
  35. public: static TC_CString& Str (HKEY k, LPCSTR path, LPCSTR name)  ;
  36. public: static TCArrayCHAR& Bin (HKEY k, LPCSTR path, LPCSTR name)  ;
  37. public: static TC_CArrayString* EnumStr (HKEY k, LPCSTR path)  ;
  38. public: static void UnuseEnumStr (HKEY k, LPCSTR path)  ;
  39. public: static TCArrayStrStr* Section (HKEY k, LPCSTR path)  ;
  40. public: static TCArrayStrArr* SectionBin (HKEY k, LPCSTR path)  ;
  41. public: static void Flush ()  ;
  42. public: static void Keys (HKEY k, LPCSTR path, TC_CArrayString &dst)  ;
  43. private:  static  char* m_Buf ;
  44. private:  static  char m_Name [1024];
  45. private: static int _Value (HKEY hkey, int num, int *plen=0)  ;
  46.  
  47. }; // end of class TC_CRegistry
  48.  
  49. // **********************************************************************
  50.  
  51. #endif // _INC_REGISTRY_HPP
  52.