12345678910111213141516171819202122232425262728293031323334353637383940 |
- /** *************************************************************** **
- ** Interface for the GIniFile class **
- ** by S.B. **
- ** *************************************************************** **/
- #include <tchar.h>
- #ifndef USE_SB_GINIFILE_CLASS
- #define USE_SB_GINIFILE_CLASS
- class GIniFile
- {
- public:
- TCHAR rFName[255],
- rSName[255];
- BOOL rLastResult;
- void SetFileName( const TCHAR *AFileName );
- // sets name of ini file
- void SetSectName( const TCHAR *ASectName );
- // sets name of section
- int GetIniStr( const TCHAR *AKeyName, TCHAR *AResult, const TCHAR *ADeflt );
- // returns ini-value and its length
- int SGetIniStr( const TCHAR *AKeyName, TCHAR *AResult, const TCHAR *ADeflt );
- // same as GetIniStr, but write ini-value if it does not exist yet
- BOOL SetIniStr( const TCHAR *AKeyName, const TCHAR *AStr );
- // writes ini-value
- long GetIniInt( const TCHAR *AKeyName, long ADeflt );
- // returns ini-value
- long SGetIniInt( const TCHAR *AKeyName, long ADeflt );
- // same as GetIniInt, but write ini-value if it does not exist yet
- BOOL SetIniInt( const TCHAR *AKeyName, long AVal );
- // writes ini-value
- double GetIniFloat( const TCHAR *AKeyName, double ADeflt );
- // returns ini-value
- double SGetIniFloat( const TCHAR *AKeyName, double ADeflt );
- // same as GetIniInt, but write ini-value if it does not exist yet
- BOOL SetIniFloat( const TCHAR *AKeyName, double AVal );
- // writes ini-value
- };
- #endif // #ifndef USE_SB_GINIFILE_CLASS
|