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.

69 lines
1.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: ilbmem.hxx
  7. //
  8. // Contents: ILockBytes memory implementation
  9. //
  10. // Classes: CMapBytes
  11. //
  12. // History: 30-Oct-92 AlexT Created
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef __ILB_HXX__
  16. #include <dfmsp.hxx> // Pick up UL64 support
  17. #if DBG == 1
  18. DECLARE_DEBUG(ol);
  19. #define olDebugOut(parms) olInlineDebugOut parms
  20. #define olAssert(exp) Win4Assert(exp)
  21. #else // DBG != 1
  22. #define olDebugOut(parms)
  23. #define olAssert(exp)
  24. #endif // DBG == 1
  25. class CMapBytes : public ILockBytes
  26. {
  27. public:
  28. CMapBytes(void);
  29. STDMETHOD(QueryInterface) (REFIID riid, LPVOID FAR* ppvObj);
  30. STDMETHOD_(ULONG,AddRef) (void);
  31. STDMETHOD_(ULONG,Release) (void);
  32. STDMETHOD(ReadAt) (ULARGE_INTEGER ulOffset,
  33. VOID HUGEP *pv,
  34. ULONG cb,
  35. ULONG FAR *pcbRead);
  36. STDMETHOD(WriteAt) (ULARGE_INTEGER ulOffset,
  37. VOID const HUGEP *pv,
  38. ULONG cb,
  39. ULONG FAR *pcbWritten);
  40. STDMETHOD(Flush) (void);
  41. STDMETHOD(GetSize) (ULARGE_INTEGER FAR *pcb);
  42. STDMETHOD(SetSize) (ULARGE_INTEGER cb);
  43. STDMETHOD(LockRegion) (ULARGE_INTEGER libOffset,
  44. ULARGE_INTEGER cb,
  45. DWORD dwLockType);
  46. STDMETHOD(UnlockRegion) (ULARGE_INTEGER libOffset,
  47. ULARGE_INTEGER cb,
  48. DWORD dwLockType);
  49. STDMETHOD(Stat) (STATSTG FAR *pstatstg, DWORD grfStatFlag);
  50. private:
  51. LONG _ulRef; // reference count
  52. ULONG _ulSize; // memory map size
  53. void FAR *_pv; // memory map
  54. };
  55. #endif // #ifndef __ILB_HXX__