comm.h

来自「用vc编写的视频采集端口编成」· C头文件 代码 · 共 37 行

H
37
字号
// Comm.h: interface for the CComm class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_COMM_H__5AC44894_C30A_11D5_BA01_52544CC01EF9__INCLUDED_)
#define AFX_COMM_H__5AC44894_C30A_11D5_BA01_52544CC01EF9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define WM_COMMNOTIFY32 WM_USER+3

class CComm  
{
private:
	HANDLE idComDev;       // handle of COMM device
	HWND hwndComm;         // handle of the owner window
	HANDLE hthreadComm;    // handle of monitor thread
	int ToStop;            // to indicate whether the monitor should exit
                       // Note: if the codes are to be used on Windows NT,
                       //       add a CriticalSection here!
	int nSerialPort;
	static void CheckComm(CComm*);
public:
	CComm();
	BOOL InitComm(HWND hwnd);
	BOOL CloseComm(void);
	int ReadComm(unsigned char* cBuf, int toRead);
	int WriteComm(unsigned char* cBuf, int toWrite);

	virtual ~CComm();

};

#endif // !defined(AFX_COMM_H__5AC44894_C30A_11D5_BA01_52544CC01EF9__INCLUDED_)

⌨️ 快捷键说明

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