在.net下的remoting使用里面,很多的书上都是使用了客户与服务器端都是使用一样共享成员或接口的示例来做说明.而且在实际的使用中有不小的问题.
public interface iconnect ´客户端与服务器端同时共享使用一个接口 function getname() as stringend interface 【程序编程相关:非递归实现不重复序列的全排列(三) 】
[共享代码]share.vbimports system.windows.forms 【推荐阅读:如何成为一个成功的Jsp程序员?】
[服务器端] ´共俩个文件,第一个是服务文件,第二个是服务调用的功能实现文件service1.vb ´引用了system.runtime.remoting.dll文件,这是服务imports system.serviceprocessimports system.runtimeimports system.runtime.remotingimports system.runtime.remoting.channels 【扩展信息:用于较小数的 BigDecimal】
public class app public shared readonly property apppath() as string ´提供一些应用程序常用路径将会在服务安装的 get ´过程中被使用 return application.startuppath end get end property public shared readonly property winpath() as string get return system.environment.getenvironmentvariable("windir") end get end propertyend class
public class service1 inherits system.serviceprocess.servicebase
#region " 组件设计器生成的代码 "
public sub new() mybase.new()
... 下一页