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.

61 lines
2.2 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: ROSTMDIR.HXX
  7. //
  8. // Contents:
  9. //
  10. // Classes: Declaration for CReadOnlyStreamDirect class
  11. //
  12. // Functions:
  13. //
  14. // History: 12-21-95 JoeS (Joe Souza) Created
  15. //
  16. //----------------------------------------------------------------------------
  17. class FAR CReadOnlyStreamDirect : public IStream, public IWinInetFileStream
  18. {
  19. public:
  20. CReadOnlyStreamDirect(CTransData *pCTransData, DWORD grfBindF, BOOL fFile=FALSE);
  21. virtual ~CReadOnlyStreamDirect(void);
  22. // *** IUnknown methods ***
  23. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  24. STDMETHOD_(ULONG,AddRef) (THIS);
  25. STDMETHOD_(ULONG,Release) (THIS);
  26. // *** IStream methods ***
  27. STDMETHOD(Read) (THIS_ VOID HUGEP *pv, ULONG cb, ULONG FAR *pcbRead);
  28. STDMETHOD(Write) (THIS_ VOID const HUGEP *pv, ULONG cb,
  29. ULONG FAR *pcbWritten);
  30. STDMETHOD(Seek) (THIS_ LARGE_INTEGER dlibMove, DWORD dwOrigin,
  31. ULARGE_INTEGER FAR *plibNewPosition);
  32. STDMETHOD(SetSize) (THIS_ ULARGE_INTEGER libNewSize);
  33. STDMETHOD(CopyTo) (THIS_ LPSTREAM pStm, ULARGE_INTEGER cb,
  34. ULARGE_INTEGER FAR *pcbRead, ULARGE_INTEGER FAR *pcbWritten);
  35. STDMETHOD(Commit) (THIS_ DWORD dwCommitFlags);
  36. STDMETHOD(Revert) (THIS);
  37. STDMETHOD(LockRegion) (THIS_ ULARGE_INTEGER libOffset,
  38. ULARGE_INTEGER cb, DWORD dwLockType);
  39. STDMETHOD(UnlockRegion) (THIS_ ULARGE_INTEGER libOffset,
  40. ULARGE_INTEGER cb, DWORD dwLockType);
  41. STDMETHOD(Stat) (THIS_ STATSTG FAR *pStatStg, DWORD grfStatFlag);
  42. STDMETHOD(Clone) (THIS_ LPSTREAM FAR *ppStm);
  43. // *** IWinInetFileStream ***
  44. STDMETHOD(SetHandleForUnlock)(THIS_ DWORD_PTR hWinInetLockHandle, DWORD_PTR dwReserved);
  45. STDMETHOD(SetDeleteFile)(THIS_ DWORD_PTR dwReserved);
  46. private:
  47. LPWSTR GetFileName();
  48. private:
  49. CRefCount _CRefs;
  50. CTransData * _pCTransData;
  51. DWORD _grfBindF;
  52. BOOL _fFile;
  53. };