网络虚拟实验平台的构建与测试摘要基于网络的虚拟实验平台是在能够进行网络通信的基础之上将计算机上虚拟的各种仪器、器件,按实验要求组装成一个完整的实验环境,实现搭接实验电路,演示实验过程等功能。远程指导模块是其中的一个功能模块。它分成指导端和被指导端两部分,指导端通过HOOK技术,采集本地机鼠标和键盘信息;然后将这些信息打包,通过P2P网络通信机制将信息包传给被指导端;在被指导端将信息包信息解出,通过mouse_event、keybd_event等函数去控制被指导端的鼠标、键盘动作,实现相关的一些远程指导动作。本模块在VC环境下开发,用到了WindowsSocket编程技术,P2P编程思想,HOOK技术,多线程技术等多方面的技术。由于整个系统模块很多,本设计中编写了独立的测试程序,经过测试基本达到预期的设计目标。关键词:远程指导;P2P;WindowsSocket编程;HOOK;多线程DesignandImplementationofRemoteGuidanceModuleBasedonNetworkVirtualExperimentPlatformAbstractUnderthefoundationofnetworkcommunications,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;Multithreading目录论文总页数:23页1引言...............................................................................................................................................11.1项目背景................................................................................................................................11.2项目介绍................................................................................................................................11.2.1基于网络的虚拟实验平台..............................................................................................11.2.2远程指导模块.................................................................................................................21.3项目要求................................................................................................................................21.3.1功能要求.........................................................................................................................21.3.2Client/Server(客户端/服务器)结构工作过程.................................................................22网络基础知识简介.......................................................................................................................32.1OSI与TCP/IP参考模型的对应关系....................................................................................32.1.1OSI参考模型....................................................................................................