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.

38 lines
895 B

  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // ParseStm.h
  4. //
  5. ///////////////////////////////////////////////////////////////////////////////
  6. // Bring in only once
  7. #if _MSC_VER > 1000
  8. #pragma once
  9. #endif
  10. class CParseStream
  11. {
  12. // Private constants
  13. private:
  14. enum { CCH_BUFF_MAX = 256 };
  15. // Private member variables
  16. private:
  17. IStream * m_pStm;
  18. TCHAR m_rgchBuff[CCH_BUFF_MAX];
  19. ULONG m_cchBuff;
  20. ULONG m_idxBuff;
  21. public:
  22. // Constructor/destructor
  23. CParseStream();
  24. ~CParseStream();
  25. HRESULT HrSetFile(DWORD dwFlags, LPCTSTR pszFilename);
  26. HRESULT HrSetStream(DWORD dwFlags, IStream * pStm);
  27. HRESULT HrReset(VOID);
  28. HRESULT HrGetLine(DWORD dwFlags, LPTSTR * ppszLine, ULONG * pcchLine);
  29. private:
  30. HRESULT _HrFillBuffer(DWORD dwFlags);
  31. };