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.

75 lines
1.5 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: ctext.hxx
  4. //
  5. // Contents: Definition of class for processing ASCII files
  6. // in unicode
  7. //
  8. // Classes: CRegTextFile
  9. //
  10. // Functions: None.
  11. //
  12. // History: 18-Dec-91 Ricksa Created
  13. //
  14. //--------------------------------------------------------------------
  15. #ifndef __CTEXT__
  16. #define __CTEXT__
  17. #include <windows.h>
  18. #include <stdio.h>
  19. #include <stdlib.h>
  20. #define COMMENT_MARK ';'
  21. #define SYS_DIR_STR TEXT("@:")
  22. #define SYS_DIR_STR_LEN (sizeof(SYS_DIR_STR) / sizeof(TCHAR) - 1)
  23. //+-------------------------------------------------------------------
  24. //
  25. // Class: CRegTextFile
  26. //
  27. // Purpose: Read in string data from a file
  28. //
  29. // Interface: GetString -- get a string from the file
  30. // GetLong -- get a string & convert it to a long
  31. // GetGUID -- read string and convert to guid format
  32. // GetPath -- read path & possibly prepend system directory.
  33. //
  34. // History: 02-Jan-92 Ricksa Created
  35. //
  36. // Notes: This is a temporary file used to support loading
  37. // class data from a file.
  38. //
  39. //--------------------------------------------------------------------
  40. class CRegTextFile
  41. {
  42. public:
  43. CRegTextFile(LPSTR);
  44. ~CRegTextFile(void);
  45. LPTSTR GetString(void);
  46. ULONG GetLong(void);
  47. GUID * GetGUID(void);
  48. LPTSTR GetPath(void);
  49. private:
  50. FILE * _fp;
  51. char _abuf[MAX_PATH];
  52. TCHAR _awcbuf[MAX_PATH];
  53. static TCHAR s_awcSysDir[MAX_PATH];
  54. static int s_cSysDir;
  55. };
  56. #endif // __CTEXT__