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.

51 lines
1.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: CASYNCLB.HXX
  7. //
  8. // Contents:
  9. //
  10. // Classes: Declaration for IAsyncLockBytes class
  11. //
  12. // Functions:
  13. //
  14. // History: 12-13-95 JoeS (Joe Souza) Created
  15. //
  16. //----------------------------------------------------------------------------
  17. class FAR CAsyncLockBytes : public ILockBytes, public IFillLockBytes
  18. {
  19. public:
  20. CAsyncLockBytes(ILockBytes *pLB);
  21. // *** IUnknown methods ***
  22. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  23. STDMETHOD_(ULONG,AddRef) (THIS);
  24. STDMETHOD_(ULONG,Release) (THIS);
  25. // *** ILockBytes methods ***
  26. STDMETHOD(ReadAt) (THIS_ ULARGE_INTEGER ulOffset, VOID HUGEP *pv,
  27. ULONG cb, ULONG FAR *pcbRead);
  28. STDMETHOD(WriteAt) (THIS_ ULARGE_INTEGER ulOffset, VOID const HUGEP *pv,
  29. ULONG cb, ULONG FAR *pcbWritten);
  30. STDMETHOD(Flush) (THIS);
  31. STDMETHOD(SetSize) (THIS_ ULARGE_INTEGER cb);
  32. STDMETHOD(LockRegion) (THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb,
  33. DWORD dwLockType);
  34. STDMETHOD(UnlockRegion) (THIS_ ULARGE_INTEGER libOffset,
  35. ULARGE_INTEGER cb, DWORD dwLockType);
  36. STDMETHOD(Stat) (THIS_ STATSTG FAR *pStatStg, DWORD grfStatFlag);
  37. // *** IFillLockBytes methods ***
  38. STDMETHOD(FillAppend) (void const *pv, ULONG cb, ULONG *pcbWritten);
  39. STDMETHOD(Terminate) (BOOL bCanceled);
  40. private:
  41. CRefCount _CRefs;
  42. ILockBytes *_pLBchain;
  43. ULARGE_INTEGER _cbFillOffset;
  44. BOOL _fFillDone;
  45. };