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

📄 tftpsrvdlg.h

📁 tftp功能服务器及客户端的实现
💻 H
字号:
// TftpSrvDlg.h : header file
//

#if !defined(AFX_TFTPSRVDLG_H__BBB0C437_906A_49C1_ABC5_AF4A91451FBE__INCLUDED_)
#define AFX_TFTPSRVDLG_H__BBB0C437_906A_49C1_ABC5_AF4A91451FBE__INCLUDED_

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

#define WM_DATADISPLAY WM_USER+1

#include "excute.h"
#include <Afxwin.h>
/////////////////////////////////////////////////////////////////////////////
// CTftpSrvDlg dialog
struct RcvParam{
	SOCKET m_Socket;
	HWND m_hwnd;
};
struct RWRQ{
	USHORT pcode;
	char fileandmode[100];
};
struct LPARAMSTRUCT{
	HWND m_TftpHwnd;
	u_short pcode;
	SOCKADDR_IN Sock_Addr;
	char fileandmode[100];
};
struct ExistRQ{
	char m_File[100];
	u_short m_Port;
	in_addr  m_Addr;
	struct ExistRQ * next;
};

static ExistRQ * RQHead = NULL;

extern DWORD WINAPI RcvProc(LPVOID lpParameter);
extern DWORD WINAPI RcvMainProc(LPVOID Rcvparam);

class CTftpSrvDlg : public CDialog
{
// Construction
public:
	
	
	static BOOL NotExist(char * FileName,SOCKADDR_IN &RcvAddr);
	OnThread();
//	static DWORD WINAPI RcvProc(LPVOID lpParameter);
	BOOL OnSockInit(u_long ip,u_short port);
	CTftpSrvDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CTftpSrvDlg)
	enum { IDD = IDD_TFTPSRV_DIALOG };
	CListBox	m_ListTxt;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTftpSrvDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CTftpSrvDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnClickCommandbutton1();
	DECLARE_EVENTSINK_MAP()
	//}}AFX_MSG
	afx_msg void OnSetDlg(WPARAM wParam,LPARAM lParam);
//	afx_msg OnSelect();
	DECLARE_MESSAGE_MAP()
private:
	static u_long ListCounter; 
	int m_Timer;
	//char *ReFile[100];
	//u_short ListPort;
//	LPARAMSTRUCT ls;
	SOCKET m_Socket;

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

#endif // !defined(AFX_TFTPSRVDLG_H__BBB0C437_906A_49C1_ABC5_AF4A91451FBE__INCLUDED_)

⌨️ 快捷键说明

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