thread1.h
资源名称:anywhere.zip [点击查看]
上传用户:zhenhuadz
上传日期:2007-01-07
资源大小:1511k
文件大小:2k
源码类别:
远程控制编程
开发平台:
Visual C++
- // thread1.h: interface for the thread class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_THREAD1_H__E2A8C320_F07F_11D3_9E45_00A0C936C4B3__INCLUDED_)
- #define AFX_THREAD1_H__E2A8C320_F07F_11D3_9E45_00A0C936C4B3__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "blocksock.h"
- //#include "common.h"
- extern CCriticalSection cs;
- extern HWND m_hMainWnd;
- extern UINT Connect(LPVOID pParam);
- //extern UINT Send(LPVOID pParam);
- extern HANDLE hSend,hRecv;//线程句柄
- extern int timeout,request;
- extern CString pix;
- extern HANDLE recvevent,sendevent;//事件
- extern DWORD WINAPI SendThread(LPVOID pParam);
- extern DWORD WINAPI GetFileThread(LPVOID pParam);
- extern DWORD WINAPI PutFileThread(LPVOID pParam);
- extern DWORD WINAPI ViewScr(LPVOID pParam);
- extern DWORD WINAPI SysThread(LPVOID pParam);
- extern void LogBlockingSocketException(LPVOID pParam, char* pch, CBlockingSocketException* pe);
- extern UINT GetFile(LPVOID pParam);
- #ifndef type_link
- #define type_link
- class CMsgman;
- typedef struct
- {
- //int nPort;//端口
- //CStringArray m_sMessage;//消息队列
- //BOOL bAssume;//是否认证
- //CString sOrder;//当前接受到的消息
- //CStringArray *sParam1;//当前消息的参数
- //-------------------------
- CString ip; //目的地址
- int mainport,getfileport,putfileport,viewport;//端口
- CString username,password;
- //主端口,下传端口,上传端口,查看屏幕端口
- CSockAddr sAddr;//地址,端口
- //CBlockingSocket m_socket;//所用连接
- char sbuf[1024];//待发消息
- char rbuf[1024];//接受到的消息
- HWND m_hWnd;//窗口句柄
- //int length;//待收字符长度
- BOOL bConnected;//是否已连接
- BOOL bChat;//是否聊天已连接
- //CMsgman *pmsgman;//消息队列指针
- }Link;
- #endif
- extern Link linkrc;
- #endif // !defined(AFX_THREAD1_H__E2A8C320_F07F_11D3_9E45_00A0C936C4B3__INCLUDED_)