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.

59 lines
1.9 KiB

  1. #pragma once
  2. #ifndef __FILESTRM_H_
  3. #define __FILESTRM_H_
  4. /*//////////////////////////////////////////////////////////////////////////////
  5. //
  6. // File: filestrm.h
  7. //
  8. // Copyright (C) 1999 Microsoft Corporation. All Rights Reserved.
  9. //
  10. // @@BEGIN_MSINTERNAL
  11. //
  12. // History:
  13. // -@- (craigp) - created
  14. // -@- 09/23/99 (mikemarr) - copyright, started history
  15. //
  16. // @@END_MSINTERNAL
  17. //
  18. //////////////////////////////////////////////////////////////////////////////*/
  19. #include <objidl.h>
  20. class CFileStream : public IStream
  21. {
  22. public:
  23. CFileStream(LPCTSTR filename, BOOL bReadOnly, BOOL bTruncate, HRESULT *error);
  24. ~CFileStream();
  25. // IUnknown methods
  26. STDMETHODIMP_(ULONG) AddRef(void);
  27. STDMETHODIMP_(ULONG) Release(void);
  28. STDMETHODIMP QueryInterface(REFIID, LPVOID FAR*);
  29. // Implemented IStream methods
  30. STDMETHODIMP Read(void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbRead);
  31. STDMETHODIMP Write(const void __RPC_FAR *pv, ULONG cb, ULONG __RPC_FAR *pcbWritten);
  32. STDMETHODIMP Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER __RPC_FAR *plibNewPosition);
  33. STDMETHODIMP Stat(STATSTG __RPC_FAR *pstatstg, DWORD grfStatFlag);
  34. // Unimplemented IStream methods
  35. STDMETHODIMP SetSize(ULARGE_INTEGER libNewSize) {return E_NOTIMPL;}
  36. STDMETHODIMP CopyTo(IStream __RPC_FAR *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER __RPC_FAR *pcbRead, ULARGE_INTEGER __RPC_FAR *pcbWritten) {return E_NOTIMPL;}
  37. STDMETHODIMP Commit(DWORD grfCommitFlags) {return E_NOTIMPL;}
  38. STDMETHODIMP Revert(void) {return E_NOTIMPL;}
  39. STDMETHODIMP LockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {return E_NOTIMPL;}
  40. STDMETHODIMP UnlockRegion(ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) {return E_NOTIMPL;}
  41. STDMETHODIMP Clone(IStream __RPC_FAR *__RPC_FAR *ppstm) {return E_NOTIMPL;}
  42. private:
  43. DWORD m_cRef;
  44. HANDLE m_hfile;
  45. };
  46. #endif // #ifndef __FILESTRM_H_