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.

65 lines
1.3 KiB

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