如何把 RemObject 的Server端放到一个dll里 例如 TRoIndyTcpServer 或 TRoIndyUdpServer放到 Exe里就很正常,但是如果放到dll里去,客户端调用Server上的方法时会卡住不动~~高人求救~~ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 放到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;类似这样做咯~~ 不清楚,可能有些东西你处理不对。可以试试直接用RO的向导选“DLL Server”来创建 那个是 loadDll 不是用网络来通信的 解决问题了,是ThreadEvent:=True 怎么转换API声明,有工具吗? Delphi + 水晶报表:“未能加载数据厍信息”问题 如何屏蔽掉Windows 2000的Ctrl+Alt+Delete?---在线急. 请问一个关于随机数的问题 她离开了我,散分!! 存储过程返回值 我想在dxdbgrid中按回车就移到同一行中的下一列,行末就到下一行(已参考dbgrid的) 有关DBgrid的一个问题,很急。请师兄们指点。。。。 让我做个pos系统,但是一点不会,请问那里有这方面的网站! SQL问题,急! 大家都知道D2010的RTTI得到了极大的增强,不知道是否也和.net那样支持动态编译呢? 求高手解决Delphi7关于表格式录入问题
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;类似这样做咯~~