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.

70 lines
2.5 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: PRIPROF.HXX
  7. //
  8. // Contents: Declaration CPrivateProfile class.
  9. //
  10. // Classes: CPrivateProfile
  11. //
  12. // History: 16-Jan-94 XimingZ Created
  13. // 6/4/97 Narindk Adapted for ctolestg
  14. //
  15. //--------------------------------------------------------------------------
  16. #ifndef __PRIPROF_HXX__
  17. #define __PRIPROF_HXX__
  18. //+-------------------------------------------------------------------------
  19. //
  20. // Class: CPrivateProfile
  21. //
  22. // Purpose: INI file access wrapper.
  23. //
  24. // History: 09-Nov-93 XimingZ Created
  25. //
  26. //--------------------------------------------------------------------------
  27. class CPrivateProfile
  28. {
  29. private:
  30. LPTSTR _ptszFile;
  31. LPTSTR _ptszSection;
  32. public:
  33. CPrivateProfile (LPCTSTR pctszFile,
  34. LPCTSTR pctszSection,
  35. HRESULT *phr);
  36. ~CPrivateProfile (VOID);
  37. HRESULT WriteString (LPCTSTR pctszKey,
  38. LPCTSTR pctszValue);
  39. HRESULT WriteLong (LPCTSTR pctszKey,
  40. LONG lValue);
  41. HRESULT WriteULong (LPCTSTR pctszKey,
  42. ULONG ulValue);
  43. HRESULT GetString (LPCTSTR pctszKey,
  44. LPTSTR ptszValue,
  45. ULONG ulMaxLen,
  46. LPCTSTR pctszDefault);
  47. HRESULT GetLong (LPCTSTR pctszKey,
  48. LONG *plValue,
  49. LONG lDefault);
  50. HRESULT GetULong (LPCTSTR pctszKey,
  51. ULONG *pulValue,
  52. ULONG ulDefault);
  53. HRESULT SetSection (LPCTSTR pctszSection);
  54. HRESULT DeleteSection (LPCTSTR pctszSection);
  55. HRESULT WriteStruct (LPCTSTR pctszKey,
  56. LPVOID pValue,
  57. UINT uSizeStruct);
  58. HRESULT GetStruct (LPCTSTR pctszKey,
  59. LPVOID pValue,
  60. UINT uSizeStruct);
  61. };
  62. #endif // __PRIPROF_HXX__