// BinaryFile.h: interface for the CBinaryFile class. // ////////////////////////////////////////////////////////////////////// #if !defined(AFX_BINARYFILE_H__148D95C2_17FE_42B6_B2B2_BFEB059D1AB8__INCLUDED_) #define AFX_BINARYFILE_H__148D95C2_17FE_42B6_B2B2_BFEB059D1AB8__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #include "TransferrableFile.h" #include class CSerialPort; class CBinaryFile : public CTransferrableFile { public: CBinaryFile(); virtual ~CBinaryFile(); bool Send(CSerialPort& port, DWORD address); bool Receive(CSerialPort& port, DWORD address, DWORD length); bool OpenForReading(TCHAR* filename); bool OpenForWriting(TCHAR* filename); private: virtual bool SendThread(); virtual bool ReceiveThread(); bool StartReceive(); static DWORD WINAPI ReceiveStatic(LPVOID thisPointer); DWORD m_Address; DWORD m_Length; CSerialPort* m_pPort; }; #endif // !defined(AFX_BINARYFILE_H__148D95C2_17FE_42B6_B2B2_BFEB059D1AB8__INCLUDED_)