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.

76 lines
2.7 KiB

  1. //---------------------------------------------------------------------------
  2. // Stream.h : CVDStream header file
  3. //
  4. // Copyright (c) 1996 Microsoft Corporation, All Rights Reserved
  5. // Developed by Sheridan Software Systems, Inc.
  6. //---------------------------------------------------------------------------
  7. #ifndef __CVDSTREAM__
  8. #define __CVDSTREAM__
  9. #ifndef VD_DONT_IMPLEMENT_ISTREAM
  10. interface IStreamEx : public IStream
  11. {
  12. public:
  13. virtual /* [local] */ HRESULT __stdcall CopyFrom(
  14. /* [unique][in] */ IStream __RPC_FAR *pstm,
  15. /* [in] */ ULARGE_INTEGER cb,
  16. /* [out] */ ULARGE_INTEGER __RPC_FAR *pcbWritten,
  17. /* [out] */ ULARGE_INTEGER __RPC_FAR *pcbRead) = 0;
  18. };
  19. class CVDStream : public IStreamEx
  20. {
  21. protected:
  22. // Construction/Destruction
  23. CVDStream();
  24. virtual ~CVDStream();
  25. public:
  26. static HRESULT Create(CVDEntryIDData * pEntryIDData, IStream * pStream, CVDStream ** ppVDStream,
  27. CVDResourceDLL * pResourceDLL);
  28. protected:
  29. // Data members
  30. DWORD m_dwRefCount; // reference count
  31. CVDEntryIDData * m_pEntryIDData; // backwards pointer to CVDEntryIDData
  32. IStream * m_pStream; // data stream pointer
  33. CVDResourceDLL * m_pResourceDLL; // resource DLL
  34. public:
  35. //=--------------------------------------------------------------------------=
  36. // IUnknown methods
  37. //
  38. STDMETHOD(QueryInterface)(REFIID riid, void **ppvObjOut);
  39. STDMETHOD_(ULONG, AddRef)(void);
  40. STDMETHOD_(ULONG, Release)(void);
  41. //=--------------------------------------------------------------------------=
  42. // IStream methods
  43. //
  44. STDMETHOD(Read)(void *pv, ULONG cb, ULONG *pcbRead);
  45. STDMETHOD(Write)(const void *pv, ULONG cb, ULONG *pcbWritten);
  46. STDMETHOD(Seek)(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition);
  47. STDMETHOD(SetSize)(ULARGE_INTEGER libNewSize);
  48. STDMETHOD(CopyTo)(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten);
  49. STDMETHOD(Commit)(DWORD grfCommitFlags);
  50. STDMETHOD(Revert)(void);
  51. STDMETHOD(LockRegion)(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
  52. STDMETHOD(UnlockRegion)(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
  53. STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
  54. STDMETHOD(Clone)(IStream **ppstm);
  55. //=--------------------------------------------------------------------------=
  56. // IStreamEx method
  57. //
  58. STDMETHOD(CopyFrom)(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbWritten, ULARGE_INTEGER *pcbRead);
  59. };
  60. #endif //VD_DONT_IMPLEMENT_ISTREAM
  61. #endif //__CVDSTREAM__