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.

63 lines
2.1 KiB

  1. /****************************************************************************
  2. *
  3. * (C) COPYRIGHT 2000, MICROSOFT CORP.
  4. *
  5. * FILE: private.h
  6. *
  7. * VERSION: 1.0
  8. *
  9. * DATE: 11/8/2000
  10. *
  11. * AUTHOR: Dave Parsons
  12. *
  13. * DESCRIPTION:
  14. * Definitions for the wiautil.lib library, which should not be public.
  15. *
  16. *****************************************************************************/
  17. #ifndef _PRIVATE_H_
  18. #define _PRIVATE_H_
  19. class CImageStream : public IStream
  20. {
  21. public:
  22. CImageStream();
  23. ~CImageStream();
  24. STDMETHOD(SetBuffer)(BYTE *pBuffer, INT iSize, SKIP_AMOUNT iSkipAmt = SKIP_OFF);
  25. // IUnknown
  26. STDMETHOD(QueryInterface)(REFIID riid, void **ppvObject);
  27. STDMETHOD_(ULONG, AddRef)();
  28. STDMETHOD_(ULONG, Release)();
  29. // ISequentialStream
  30. STDMETHOD(Read)(void *pv, ULONG cb, ULONG *pcbRead);
  31. STDMETHOD(Write)(const void *pv, ULONG cb, ULONG *pcbWritten);
  32. // IStream
  33. STDMETHOD(Seek)(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition);
  34. STDMETHOD(SetSize)(ULARGE_INTEGER libNewSize);
  35. STDMETHOD(CopyTo)(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten);
  36. STDMETHOD(Commit)(DWORD grfCommitFlags);
  37. STDMETHOD(Revert)();
  38. STDMETHOD(LockRegion)(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
  39. STDMETHOD(UnlockRegion)(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType);
  40. STDMETHOD(Stat)(STATSTG *pstatstg, DWORD grfStatFlag);
  41. STDMETHOD(Clone)(IStream **ppstm);
  42. private:
  43. LONG m_cRef; // Reference count
  44. BYTE *m_pBuffer; // Buffer to use for reads and writes
  45. INT m_iSize; // Size of the buffer
  46. INT m_iPosition; // Current position in the buffer
  47. INT m_iOffset; // Offset to apply to reads and writes
  48. BYTE m_Header[sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFOHEADER)];
  49. // Location to store bmp file and info headers
  50. };
  51. #endif // _PRIVATE_H_