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
2.0 KiB

  1. //+-------------------------------------------------------------------
  2. //
  3. // File: persist.hxx
  4. //
  5. // Contents: CPersistStorage declaration
  6. //
  7. // History: 24-Nov-92 DeanE Created
  8. //
  9. //---------------------------------------------------------------------
  10. #ifndef __PERSIST_HXX__
  11. #define __PERSIST_HXX__
  12. #include <embed.hxx>
  13. //+-------------------------------------------------------------------
  14. // Class: CPersistStorage
  15. //
  16. // Synopsis: Test class CPersistStorage
  17. //
  18. // Methods: QueryInterface IUnknown
  19. // AddRef IUnknown
  20. // Release IUnknown
  21. // GetClassId IPersist
  22. // IsDirty IPersistStorage
  23. // InitNew IPersistStorage
  24. // Load IPersistStorage
  25. // Save IPersistStorage
  26. // SaveCompleted IPersistStorage
  27. //
  28. // History: 24-Nov-92 DeanE Created
  29. //--------------------------------------------------------------------
  30. class FAR CPersistStorage : public IPersistStorage
  31. {
  32. public:
  33. // Constructor/Destructor
  34. CPersistStorage(CTestEmbed *pteObject);
  35. ~CPersistStorage();
  36. // IUnknown - Everyone inherits from this
  37. STDMETHODIMP QueryInterface(REFIID iid, void FAR * FAR *ppv);
  38. STDMETHODIMP_(ULONG) AddRef (void);
  39. STDMETHODIMP_(ULONG) Release (void);
  40. // IPersist - IPersistStorage inherits from this
  41. STDMETHODIMP GetClassID (LPCLSID pClassId);
  42. // IPersistStorage
  43. STDMETHODIMP IsDirty (void);
  44. STDMETHODIMP InitNew (LPSTORAGE pStg);
  45. STDMETHODIMP Load (LPSTORAGE pStg);
  46. STDMETHODIMP Save (LPSTORAGE pStgSave,
  47. BOOL fSameAsLoad);
  48. STDMETHODIMP SaveCompleted (LPSTORAGE pStgSaved);
  49. STDMETHODIMP HandsOffStorage (void);
  50. private:
  51. ULONG _cRef; // Reference count
  52. CTestEmbed *_pteObject; // Object we're associated with
  53. BOOL _fDirty; // TRUE if object is dirty
  54. };
  55. #endif // __PERSIST_HXX__