paraio.h

来自「并口PCI调试工具」· C头文件 代码 · 共 49 行

H
49
字号
// PortIO.h: interface for the CPortIO class.
//
//
#if !defined ParaIO_h_
#define ParaIO_h_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "PortQue.h"
// define the send and receive threads

typedef struct t_SENDDATA
{
	CFile *pFile;
	LPSTR lpBuf;
	int len;
} SENDDATA;
typedef struct t_RECVDATA
{
	CFile *pFile;
	int hdrSz;
	int bodyPos;
	CWzdQueue *pQueue;
	CWnd *pWnd;
	UINT msg;
	UINT id;
} RECVDATA;

class CWzdPortIO : public CFile
{
	public:
	CWzdPortIO() {};
	virtual ~CWzdPortIO() {};
	BOOL OpenLPT( int n,CFileException *e = NULL );
	BOOL OpenCOM( int n,CFileException *e = NULL, int baud = -1,
	int parity = -1, int databits = -1, int stopbits = -1);
	void Send( LPSTR lpBuf, int len );
	void Listen( int hdrSz, int bodyPos, CWzdQueue *pQueue, CWnd *pWnd,UINT msg, UINT id);

	private:
	SENDDATA m_SendData;
	RECVDATA m_RecvData;
};

UINT SendThread( LPVOID pParam );
UINT RecvThread( LPVOID pParam );

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?