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
39 lines
1.5 KiB
// =================================================================================
|
|
// HFILE Stream Definition
|
|
// =================================================================================
|
|
#ifndef __HFILESTM_H
|
|
#define __HFILESTM_H
|
|
|
|
// =================================================================================
|
|
// CHFileStm
|
|
// =================================================================================
|
|
class CHFileStm : public IStream
|
|
{
|
|
private:
|
|
ULONG m_cRef;
|
|
HANDLE m_hFile;
|
|
DWORD m_dwDesiredAccess;
|
|
|
|
public:
|
|
CHFileStm (HANDLE hFile, DWORD dwDesiredAccess);
|
|
~CHFileStm ();
|
|
HRESULT HrVerifyState (DWORD dwAccess);
|
|
STDMETHODIMP_(ULONG) AddRef (VOID);
|
|
STDMETHODIMP_(ULONG) Release (VOID);
|
|
STDMETHODIMP QueryInterface (REFIID, LPVOID*);
|
|
STDMETHODIMP Read (LPVOID, ULONG, ULONG*);
|
|
STDMETHODIMP Write (const void *, ULONG, ULONG*);
|
|
STDMETHODIMP Seek (LARGE_INTEGER, DWORD, ULARGE_INTEGER*);
|
|
STDMETHODIMP SetSize (ULARGE_INTEGER);
|
|
STDMETHODIMP CopyTo (LPSTREAM, ULARGE_INTEGER, ULARGE_INTEGER*, ULARGE_INTEGER*);
|
|
STDMETHODIMP Commit (DWORD);
|
|
STDMETHODIMP Revert ();
|
|
STDMETHODIMP LockRegion (ULARGE_INTEGER, ULARGE_INTEGER,DWORD);
|
|
STDMETHODIMP UnlockRegion (ULARGE_INTEGER, ULARGE_INTEGER, DWORD);
|
|
STDMETHODIMP Stat (STATSTG*, DWORD);
|
|
STDMETHODIMP Clone (LPSTREAM*);
|
|
};
|
|
|
|
typedef CHFileStm *LPHFILESTM;
|
|
|
|
#endif __HFILESTM_H
|