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.

97 lines
2.4 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1994.
  5. //
  6. // File: filllkb.hxx
  7. //
  8. // Contents: CFillLockBytes class header
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 28-Dec-95 PhilipLa Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __FILLLKB_HXX__
  18. #define __FILLLKB_HXX__
  19. #include "ifill.h"
  20. //+---------------------------------------------------------------------------
  21. //
  22. // Class: CFillLockBytes
  23. //
  24. // Purpose:
  25. //
  26. // Interface:
  27. //
  28. // History: 28-Dec-95 PhilipLa Created
  29. //
  30. // Notes:
  31. //
  32. //----------------------------------------------------------------------------
  33. class CFillLockBytes: public ILockBytes,
  34. public IFillLockBytes
  35. {
  36. public:
  37. CFillLockBytes(ILockBytes *pilb);
  38. ~CFillLockBytes();
  39. SCODE Init(void);
  40. // IUnknown
  41. STDMETHOD(QueryInterface)(REFIID iid, void **ppvObj);
  42. STDMETHOD_(ULONG, AddRef)(void);
  43. STDMETHOD_(ULONG, Release)(void);
  44. // ILockBytes
  45. STDMETHOD(ReadAt)(ULARGE_INTEGER ulOffset,
  46. VOID HUGEP *pv,
  47. ULONG cb,
  48. ULONG *pcbRead);
  49. STDMETHOD(WriteAt)(ULARGE_INTEGER ulOffset,
  50. VOID const HUGEP *pv,
  51. ULONG cb,
  52. ULONG *pcbWritten);
  53. STDMETHOD(Flush)(void);
  54. STDMETHOD(SetSize)(ULARGE_INTEGER cb);
  55. STDMETHOD(LockRegion)(ULARGE_INTEGER libOffset,
  56. ULARGE_INTEGER cb,
  57. DWORD dwLockType);
  58. STDMETHOD(UnlockRegion)(ULARGE_INTEGER libOffset,
  59. ULARGE_INTEGER cb,
  60. DWORD dwLockType);
  61. STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
  62. //From IFillLockBytes
  63. STDMETHOD(FillAppend)(void const *pv,
  64. ULONG cb,
  65. ULONG *pcbWritten);
  66. STDMETHOD(FillAt)(ULARGE_INTEGER ulOffset,
  67. void const *pv,
  68. ULONG cb,
  69. ULONG *pcbWritten);
  70. STDMETHOD(SetFillSize)(ULARGE_INTEGER ulSize);
  71. STDMETHOD(Terminate)(BOOL bCanceled);
  72. SCODE GetFailureInfo(ULONG *pulWaterMark, ULONG *pulFailurePoint);
  73. HANDLE GetNotificationEvent(void);
  74. SCODE GetTerminationStatus(DWORD *pdwFlags);
  75. private:
  76. ILockBytes *_pilb;
  77. ULONG _ulHighWater;
  78. DWORD _dwTerminate;
  79. ULONG _ulFailurePoint;
  80. HANDLE _hNotifyEvent;
  81. };
  82. #endif // #ifndef __FILLLKB_HXX__