本主题介绍一项传统技术,保留该技术是为了向后兼容现有的应用程序,不建议对新的开发使用该技术。现在应该使用 Windows Communication Foundation (WCF) 来开发分布式应用程序。
下面的过程演示如何使用随 Windows SDK 提供的命令行工具编译在下列主题中生成的基本远程处理应用程序:如何:生成可远程处理的类型、如何:生成宿主应用程序以及如何:生成客户端应用程序。其中每个主题中的说明都指示您创建 remoting 目录以及 type、client 和 listener 子目录。
编译和运行基本远程处理应用程序
在
remoting\type目录中的命令提示符处,键入以下命令:vbc /t:library RemotableType.vbcsc /noconfig /t:library RemotableType.cs将
RemotableType.dll复制到remoting\client和remoting\listener目录中。将
listener.exe.config复制到remoting\listener目录中。将
client.exe.config复制到remoting\client目录中。在
remoting\listener目录中的命令提示符处,键入以下命令:vbc /r:RemotableType.dll Listener.vbcsc /noconfig /r:RemotableType.dll Listener.cs在
remoting\client目录中的命令提示符处,键入以下命令:vbc /r:RemotableType.dll client.vbcsc /noconfig /r:RemotableType.dll Listener.cs csc /noconfig /r:RemotableType.dll Client.cs在
remoting\listener目录中的命令提示符处,键入Listener。当
Listener应用程序运行时,在remoting\client目录中打开一个新的命令提示符,然后键入Client。
另请参见
其他资源
生成日期:2010-02-13