1234567891011121314151617181920212223242526272829303132333435 |
- #include "StdAfx.h"
- #include "FileInputFiled.h"
- CFileInputFiled::CFileInputFiled( CString filed_name,CString filed_value,CString file_name ) :CInputFiled(filed_name,filed_value,INPUT_FILED_FILE)
- {
- this->m_file=new CFile(file_name,CFile::OpenFlags::modeRead);
- }
- CFileInputFiled::~CFileInputFiled(void)
- {
- delete m_file;
- m_file = NULL;
- }
- unsigned long CFileInputFiled::DataSize()
- {
- return m_file->GetLength();
- }
- void CFileInputFiled::Open()
- {
- m_file->SeekToBegin();
- }
- void CFileInputFiled::Close()
- {
- m_file->Close();
- }
- int CFileInputFiled::Read( void* buffer,int buffer_size )
- {
- return m_file->Read(buffer,buffer_size);
- }
|