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.

39 lines
1.5 KiB

  1. // =================================================================================
  2. // HFILE Stream Definition
  3. // =================================================================================
  4. #ifndef __HFILESTM_H
  5. #define __HFILESTM_H
  6. // =================================================================================
  7. // CHFileStm
  8. // =================================================================================
  9. class CHFileStm : public IStream
  10. {
  11. private:
  12. ULONG m_cRef;
  13. HANDLE m_hFile;
  14. DWORD m_dwDesiredAccess;
  15. public:
  16. CHFileStm (HANDLE hFile, DWORD dwDesiredAccess);
  17. ~CHFileStm ();
  18. HRESULT HrVerifyState (DWORD dwAccess);
  19. STDMETHODIMP_(ULONG) AddRef (VOID);
  20. STDMETHODIMP_(ULONG) Release (VOID);
  21. STDMETHODIMP QueryInterface (REFIID, LPVOID*);
  22. STDMETHODIMP Read (LPVOID, ULONG, ULONG*);
  23. STDMETHODIMP Write (const void *, ULONG, ULONG*);
  24. STDMETHODIMP Seek (LARGE_INTEGER, DWORD, ULARGE_INTEGER*);
  25. STDMETHODIMP SetSize (ULARGE_INTEGER);
  26. STDMETHODIMP CopyTo (LPSTREAM, ULARGE_INTEGER, ULARGE_INTEGER*, ULARGE_INTEGER*);
  27. STDMETHODIMP Commit (DWORD);
  28. STDMETHODIMP Revert ();
  29. STDMETHODIMP LockRegion (ULARGE_INTEGER, ULARGE_INTEGER,DWORD);
  30. STDMETHODIMP UnlockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD);
  31. STDMETHODIMP Stat (STATSTG*, DWORD);
  32. STDMETHODIMP Clone (LPSTREAM*);
  33. };
  34. typedef CHFileStm *LPHFILESTM;
  35. #endif __HFILESTM_H