591论文网www.591LW.com网络虚拟实验平台的构建与测试摘要基于网络的虚拟实验平台是在能够进行网络通信的基础之上将计算机上虚拟的各种仪器、器件,按实验要求组装成一个完整的实验环境,实现搭接实验电路,演示实验过程等功能。远程指导模块是其中的一个功能模块。它分成指导端和被指导端两部分,指导端通过HOOK技术,采集本地机鼠标和键盘信息;然后将这些信息打包,通过P2P网络通信机制将信息包传给被指导端;在被指导端将信息包信息解出,通过mouse_event、keybd_event等函数去控制被指导端的鼠标、键盘动作,实现相关的一些远程指导动作。本模块在VC环境下开发,用到了WindowsSocket编程技术,P2P编程思想,HOOK技术,多线程技术等多方面的技术。由于整个系统模块很多,本设计中编写了独立的测试程序,经过测试基本达到预期的设计目标。关键词:远程指导;P2P;WindowsSocket编程;HOOK;多线程591论文网www.591LW.comDesignandImplementationofRemoteGuidanceModuleBasedonNetworkVirtualExperimentPlatformAbstractUnderthefoundationofnetworkcommunications,thenetwork-basedVirtualExperimentalPlatformcouldintegratevariouscomputervirtualdevicesintoacompleteexperimentalenvironmentaccordingtotheexperimentrequirements,andconnecttheexperimentcircuitanddemonstratetheprocessofexperiment.Theremoteguidingmodulewasoneoffunctionmodules,whichwasdividedintoguidingendandtheguidedend.WithHOOK,theguidingendcapturedtheinformationoflocalmouseandkeyboard,andpackedtheinformationtosendtotheguidedpartthroughpeer-to-peernetworkcommunicationmechanism.Theguidedendwillunpacktheinformation,andcontrolthemouseandkeyboardoftheguidedendbymouse_event,keybd_eventfunctionstoimplementsomeremotecontrolactions.DevelopedunderVCenvironment,theremoteguidancemoduleusedWindowsSocketprogrammingtechnology,P2Pprogrammingideas,HOOKtechnology,multithreadingtechnology,andetc.Becausetherearemanymodulesforthewholesystem,anindependenttestingprocedurewasprogrammedtotestthemodules,whichhadbeenproventoachievethedesiredobjectivesKeywords:Remoteguidance;Peer-to-Peer;WindowsSocketprogramming;HOOK;Multithreading591论文网www.591LW.com目录论文总页数:23页1引言................................................................................................................................................21.1项目背景.................................................................................................................................21.2项目介绍.................................................................................................................................21.2.1基于网络的虚拟实验平台.............................................................................................21.2.2远程指导模块.................................................................................................................31.3项目要求................................................................................................................................31.3.1功能要求.........................................................................................................................31.3.2Client/Server(客户端/服务器)结构工作过程.................................................................32网络基础知识简介.......................................................................................................................42.1OSI与TCP/IP参考模型的对应关系....................................................................................42.1.1OSI参考模型..................................................................................................................42.1.2TCP/IP参考模型.............................................................................................................52.2WINDOWSSOCKET编程原理及操作步骤..............................................................................62.3P2P网络介绍.........................................................................................................................93相关函数分析与代码实现...........................................................................................................93.1多线程.....................................................................................................................................93.1.1进程介绍.........................................................................................................................93.1.2线程介绍.........................................................................................................................93.1.3进程与线程的关系.......................................................................................................103.1.4多线程实现.................................................................................................................103.2HOOK技术..........................................................................................................................103.2.1Hook函数简介及类型..................................................................................................103.2.2Hook子过程处理..........................................................................................................133.2.3Hook的安装/卸载.........................................................................................................143.3设计流程及函数思想..........................................................................................................163.3.1简述...............................................................................................................................163.3.2代码分析....................................................................................................................