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.
 
 
 
 
 
 

66 lines
1.5 KiB

/*++
Copyright (c) 1997 Microsoft Corporation
Module Name :
FInStrm.h
Abstract:
A lightweight implementation of input streams using files
Author:
Neil Allain ( a-neilal ) August-1997
Revision History:
--*/
#pragma once
#include "InStrm.h"
#include "except.h"
#include "eh.h"
class FileInStream : public InStream
{
public:
FileInStream();
HRESULT Init( LPCTSTR );
~FileInStream();
HRESULT CreateFileMapping ();
void UnMapFile();
virtual HRESULT readChar( _TCHAR& );
virtual HRESULT read( CharCheck&, String& );
virtual HRESULT skip( CharCheck& );
virtual HRESULT back( size_t );
bool is_open() const { return m_bIsOpen; }
HANDLE handle() const { return m_hFile; }
bool is_UTF8() const { return m_bIsUTF8; }
bool ReadMappedFile(LPVOID buff, DWORD countOfBytes, LPDWORD BytesRead);
void SetCurrFilePointer(LONG DistToMove, PLONG DistToMoveH, DWORD refPoint);
private:
HANDLE m_hFile;
HANDLE m_hMap;
bool m_bIsOpen;
bool m_bIsUTF8;
bool m_fInited;
BYTE* m_pbStartOfFile;
LONG m_cbCurrOffset;
LONG m_cbFileSize;
};
class IPIOException
{
private :
unsigned int nSE;
public :
IPIOException () : nSE(0) {}
IPIOException (unsigned int n) : nSE(n) {}
~IPIOException () {}
unsigned int getSeNumber () {return nSE;}
};
void __cdecl poi_Capture(unsigned int u, _EXCEPTION_POINTERS* pExp);