⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 threadfunc.h

📁 实现文件传书是很有用的一个传书软件是大势的比口欧式
💻 H
字号:
#if !defined(AFX_THREADFUNC_H__2DA67037_BF37_46F9_AAE6_5CBBAEE1FC04__INCLUDED_)
#define AFX_THREADFUNC_H__2DA67037_BF37_46F9_AAE6_5CBBAEE1FC04__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ThreadFunc.h : header file
//
#ifndef _THREADFUNC_H_
#define _THREADFUNC_H_
#include "MySocket.h"
//一次读取数据大小
#define ReadSize 1024
//数据发送事件
extern HANDLE hMessageSend[NumOfThread];
//数据发送完成事件
extern HANDLE hEvent[NumOfThread];
//侦听套接字和发送数据套接字
extern CMySocket listenSocket,sendSockets[NumOfThread];
//发送文件名
extern char fn[40];
//发送数据线程
DWORD WINAPI SendThreadFunction(LPVOID lpParameter);
//监听线程
DWORD WINAPI MonitorFunc(LPVOID lpParameter);
//发送数据函数
void SendThread(int idx);
//获得一个线程要写入文件的开始位置和文件块大小
void GetBeginPos(int TotalThreads,int ThreadIndex,long file_length,long &BgPos,long &BlkSize);
#endif
////////////////////////////////////////////////////////////
// ThreadFunc command target

class ThreadFunc : public CAsyncSocket
{
// Attributes
public:

// Operations
public:
	ThreadFunc();
	virtual ~ThreadFunc();

// Overrides
public:
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(ThreadFunc)
	//}}AFX_VIRTUAL

	// Generated message map functions
	//{{AFX_MSG(ThreadFunc)
		// NOTE - the ClassWizard will add and remove member functions here.
	//}}AFX_MSG

// Implementation
protected:
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_THREADFUNC_H__2DA67037_BF37_46F9_AAE6_5CBBAEE1FC04__INCLUDED_)

⌨️ 快捷键说明

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