C++语言开发的受机短信相关的源程序

源代码在线查看: drv.h

软件大小: 226 K
上传用户: wangregret2000
关键词: 语言 短信 源程序
下载地址: 免注册下载 普通下载 VIP

相关代码

				 // Drv.h: interface for the CDrv class.
				//
				//////////////////////////////////////////////////////////////////////
				
				#if !defined(AFX_DRV_H__966EC0B9_5F11_11D2_A6F4_00A0C98659CB__INCLUDED_)
				#define AFX_DRV_H__966EC0B9_5F11_11D2_A6F4_00A0C98659CB__INCLUDED_
				
				#if _MSC_VER > 1000
				#pragma once
				#endif // _MSC_VER > 1000
				#include "Thread.h"
				#include "Pool.h"
				#include "Drvmacro.h"
				
				#define CODE_NO_LEN	0
				#define CODE_ERROR	-1
				typedef int (*LP_ON_READ)(LPVOID pbuff,int size,HANDLE hUser);
				typedef int (*LP_ON_ERROR)(int Error,HANDLE hUser);
				
				class CDrv : public CThread 
				{
				public:
					CDrv(HANDLE hFile,LP_ON_READ pReadFun,LP_ON_ERROR pErrorFun,HANDLE hUser);
					virtual ~CDrv();
					int Send(LPVOID pBuff,int size);
				protected:
					void SetReceiver(LP_ON_READ pReadFun,LP_ON_ERROR pErrorFun,HANDLE hUser);
					CRITICAL_SECTION m_Critical;
					LP_ON_READ m_pOnReadFun;
					LP_ON_ERROR m_pOnErrorFun;
					HANDLE m_hUser;
					HANDLE m_hFile;
					CPool m_RcvPool;
					CPool m_SndPool;
					virtual int OnRead(LPVOID pData,int size);
					virtual int OnError(int ErrorCode);
				};
				
				#endif // !defined(AFX_DRV_H__966EC0B9_5F11_11D2_A6F4_00A0C98659CB__INCLUDED_)
							

相关资源