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
987 B

  1. #pragma once
  2. #include "parser.h"
  3. class CMMFParser
  4. {
  5. protected:
  6. class CMarsDocument* m_pMarsDocument;
  7. DWORD m_dwDocSize;
  8. BYTE* m_rgDocBuff;
  9. CComBSTR m_bstrFirstPlace;
  10. CMMFParser( CMarsDocument *pMarsDocument );
  11. ~CMMFParser()
  12. {
  13. if(m_rgDocBuff) LocalFree( m_rgDocBuff );
  14. }
  15. HRESULT DoPlace ( BYTE*& rgBuffer );
  16. HRESULT DoPanel ( BYTE*& rgBuffer );
  17. HRESULT DoPlaces ( BYTE*& rgBuffer );
  18. HRESULT DoPanels ( BYTE*& rgBuffer );
  19. HRESULT DoMarsApp( BYTE* rgBuffer );
  20. template <class T> void Extract( BYTE*& rgBuffer, T& pRet )
  21. {
  22. ::CopyMemory( &pRet, rgBuffer, sizeof(T) );
  23. rgBuffer += sizeof(T);
  24. }
  25. public:
  26. HRESULT ReadFile( const CComPtr<IStream>& spis );
  27. static HRESULT ReadMMFStreamCookie( const CComPtr<IStream>& spis );
  28. static HRESULT MMFToMars( LPCWSTR pszMMFUrl, class CMarsDocument* pMarsDocument );
  29. };