应用服务器不能访问客户端,你可以用间接的方法达到你的目的,如用udp等

解决方案 »

  1.   

    可以的
    比如你有一个属性 names OleVariant类型
    那么在客户端就可以用:
    caption:=string(DCOMConnection1.AppServer.names);或者用creatremotecomobject,得到接口,然后再调用属性
      

  2.   

    补充:
    服务器实现
    function Thehe.Get_names: OleVariant;
    begin
      result:='hello';
    end;
      

  3.   

    请问,我在服务器的
      function Thehe.Set_names: OleVariant
      begin
           end;
    写的代码的值会由
    function Thehe.Get_names: OleVariant
    BeginEnd;
    返回到前端吗?
      

  4.   

    TO :del_c_sharp
        你给我的方法可以实瑞,我将代码写在
    function Thehe.Get_names: OleVariant
    Begin
    End;
    但是我想问一下function Thehe.Get_names: OleVariant
    Begin
    End;
    的作用是什么呢,可以有范例代码吗以给我一份,不胜感激!!
      

  5.   

    var
      v:OleVariant;
    DCOMConnection1.AppServer.getstr(v);
    DCOMConnection1.AppServer.names:=v;
    这样就可以把方法返回值,交给属性了
    服务器端:
    procedure Thehe.getstr(var v: OleVariant)
    begin
      result:='nice to meet you!';
    end;
      

  6.   

    哦,不好意思。笔误:
    因该是
    procedure Thehe.getstr(var v: OleVariant)
    begin
      v:='nice to meet you!';
    end;