例如 TRoIndyTcpServer 或 TRoIndyUdpServer
放到 Exe里就很正常,但是如果放到dll里去,
客户端调用Server上的方法时会卡住不动~~
高人求救~~

解决方案 »

  1.   

    放到DLL里意思就是 在
    library xxxxuses
      uCModule in 'uCModule.pas' {CModule: TDataModule};{$R *.res}
    var
      aComponent:TComponent;procedure   DLLEntryPoint(dwReason:   DWord);
    begin
        case   dwReason   of
            DLL_PROCESS_ATTACH:
            begin
                aComponent:=TCModule.Create(nil);
            end;
            DLL_PROCESS_DETACH:
            begin
              FreeAndNil(aComponent);
            end;
        end;
    end;
    begin
      DllProc   :=   @DLLEntryPoint;
      DLLEntryPoint(DLL_PROCESS_ATTACH);
    end.unit uCModule;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, uRoModule,
      uClientDefine, Dialogs, uFuncModule, ActnList, CoolTrayIcon, Menus, ImgList, AppEvnts,
      uROClient, uROServer, uROIndyUDPServer, uROBinMessage;type
      TCModule = class(TFuncModule, ICModule)
        ROBinMessage1: TROBinMessage;
        ROIndyUDPServer1: TROIndyUDPServer;
      private
        { Private declarations }
      public
        { Public declarations }
        constructor Create(AOwner:TComponent); override;
      end;var
      CModule: TCModule;implementationuses gDefine,uCommon;{$R *.dfm}constructor TCModule.Create(AOwner: TComponent);
    begin
      inherited Create(AOwner);
      ROIndyUDPServer1.Active:=True;
    end;类似这样做咯~~
      

  2.   

    不清楚,可能有些东西你处理不对。可以试试直接用RO的向导选“DLL Server”来创建
      

  3.   

    那个是 loadDll 不是用网络来通信的
      

  4.   

    解决问题了,是ThreadEvent:=True