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.

63 lines
1.4 KiB

  1. #include <tchar.h> // for _tprintf
  2. class CPropStgMarshalTest
  3. {
  4. public:
  5. CPropStgMarshalTest( );
  6. ~CPropStgMarshalTest();
  7. public:
  8. HRESULT Init( OLECHAR *pwszDocFileName,
  9. PROPVARIANT rgpropvar[],
  10. PROPSPEC rgpropspec[],
  11. ULONG cAllProperties,
  12. ULONG cSimpleProperties );
  13. HRESULT Run();
  14. private:
  15. void Status( LPCTSTR tsz )
  16. {
  17. // wprintf( TEXT(" %s\n"), tsz );
  18. }
  19. void ErrorStatus( LPCTSTR tsz )
  20. {
  21. _tprintf( TEXT(" Error: %s\n"), tsz );
  22. }
  23. HRESULT DeleteProperties( IPropertyStorage *ppstg, BOOL fMarshaled );
  24. HRESULT WriteProperties( IPropertyStorage *ppstg, BOOL fMarshaled );
  25. HRESULT ReadAndCompareProperties( IPropertyStorage *ppstg, BOOL fMarshaled );
  26. private:
  27. // The total number of propertie sin m_rgpropvar, and the
  28. // number of those which are simple properties (all the non-simple
  29. // properties are at the end of the array).
  30. ULONG m_cAllProperties;
  31. ULONG m_cSimpleProperties;
  32. // The properties and propspecs
  33. PROPSPEC *m_rgpropspec;
  34. PROPVARIANT *m_rgpropvar;
  35. // The file to work with.
  36. OLECHAR *m_pwszDocFileName;
  37. // Are we initialize?
  38. BOOL m_fInitialized;
  39. };
  40. #define ERROR_EXIT(tsz) { ErrorStatus(tsz); goto Exit; }