#pragma once

#include "kpi_impl.h"
//////////////////////////////////////////////////////////////////////////////
class KbKpiFileStream : public KbKpiUnknownImpl<IStream>
{
protected:
    IKpiFile *m_pFile;
public:
    KbKpiFileStream(IKpiFile *pFile);
    ~KbKpiFileStream(void);
    //
    // Methods of IStream
    //
    HRESULT STDMETHODCALLTYPE Read( void *pv, ULONG cb, ULONG *pcbRead );
    HRESULT STDMETHODCALLTYPE Seek( LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition );
    HRESULT STDMETHODCALLTYPE Stat( STATSTG *pstatstg, DWORD grfStatFlag );
    //
    // Unimplemented methods of IStream
    //
    HRESULT STDMETHODCALLTYPE Write( void const *pv, ULONG cb, ULONG *pcbWritten )
    {
        return( E_NOTIMPL );
    }
    HRESULT STDMETHODCALLTYPE SetSize( ULARGE_INTEGER libNewSize )
    {
        return( E_NOTIMPL );
    }
    HRESULT STDMETHODCALLTYPE CopyTo( IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten )
    {
        return( E_NOTIMPL );
    }
    HRESULT STDMETHODCALLTYPE Commit( DWORD grfCommitFlags )
    {
        return( E_NOTIMPL );
    }
    HRESULT STDMETHODCALLTYPE Revert()
    {
        return( E_NOTIMPL );
    }
    HRESULT STDMETHODCALLTYPE LockRegion( ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType )
    {
        return( E_NOTIMPL );
    }
    HRESULT STDMETHODCALLTYPE UnlockRegion( ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType )
    {
        return( E_NOTIMPL );
    }
    HRESULT STDMETHODCALLTYPE Clone( IStream **ppstm )
    {
        return( E_NOTIMPL );
    }
};
//////////////////////////////////////////////////////////////////////////////
