Delphi编写soap服务器与客户端程序[3]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 flyhope2005 的 blog

      function login(name:string;pwd:string):boolean;stdcall;    //需要发布的方法
end;
implementation
initialization
      invregistry.registerinterface(typeinfo(imytest));
end.

mytestimpl.pas接口实现文件内容:

unit mytestimpl;
interface
uses
invokeregistry, types, xsbuiltins, mytestintf;
type
      tmytest = class(tinvokableclass, imytest)
  public
      function login(name:string;pwd:string):boolean;stdcall;
  end;
implementation
{ tmytest
}
function tmytest.login(name, pwd: string): boolean;       //
自己定义的方法的实现代码
begin
    if ((name='1') and (pwd='abc')) then
          result:=true
    else
          result:=false;
end
;
initialization
  invregistry.registerinvokableclass(tmytest);

本文关键:Delphi编写soap服务器与客户端程序
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top