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.

50 lines
1.1 KiB

  1. // RegFile.h: interface for the CRegFile class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_REGFILE_H__1D242B07_3CC1_43C4_9D23_A070EB6C286E__INCLUDED_)
  5. #define AFX_REGFILE_H__1D242B07_3CC1_43C4_9D23_A070EB6C286E__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "SmartBuffer.h"
  10. #include "RegDataItem.h" // Added by ClassView
  11. enum SectionType
  12. {
  13. SECTION_ADDREG,
  14. SECTION_DELREG,
  15. SECTION_NONE
  16. };
  17. class CRegFile
  18. {
  19. public:
  20. virtual bool NeedStorageOfValueData();
  21. CRegFile();
  22. virtual ~CRegFile();
  23. bool Init(LPCTSTR FileName, BOOL ForReading=FALSE);
  24. TCHAR PeekNextChar();
  25. LPCTSTR GetNextLine();
  26. LPCTSTR GetNextSubKey(LPCTSTR KeyName);
  27. virtual CRegDataItemPtr GetNextDataItem();
  28. void WriteString(LPCTSTR str);
  29. void WriteData(LPBYTE pData, DWORD NumBytes);
  30. void WriteNewLine();
  31. virtual void WriteDataItem(enum SectionType t, CRegDataItemPtr r);
  32. protected:
  33. FILE* m_pFile;
  34. LPCTSTR m_pTempLine;
  35. CSmartBuffer<TCHAR*> m_TempNameBuf;
  36. };
  37. #endif // !defined(AFX_REGFILE_H__1D242B07_3CC1_43C4_9D23_A070EB6C286E__INCLUDED_)