Important note about DLL memory management: ShareMem must be the first unit in your library's USES clause AND your project's (select Project-View Source) USES clause if your DLL exports any procedures or functions that pass strings as parameters or function results. This applies to all strings passed to and from your DLL--even those that are nested in records and classes. ShareMem is the interface unit to the BORLNDMM.DLL shared memory manager, which must be deployed along with your DLL. To avoid using BORLNDMM.DLL, pass string information using PChar or ShortString parameters.
first unit in your library's USES clause AND your project's (select
Project-View Source) USES clause if your DLL exports any procedures or
functions that pass strings as parameters or function results. This
applies to all strings passed to and from your DLL--even those that
are nested in records and classes. ShareMem is the interface unit to
the BORLNDMM.DLL shared memory manager, which must be deployed along
with your DLL. To avoid using BORLNDMM.DLL, pass string information
using PChar or ShortString parameters.
但有一新问题:我用DELPHI开发了一个COM+组件并将它install在A计算机,客户端程序在A中运行正常,但当我将客户端程序拷贝到B计算机时无法访问A计算机的服务(我已经在B中注册了TLB文件,也尝试过在A的组件管理中导出应用程序代理),我的Client代码如下:
tmpObj := CoCoSysInfoObj.CreateRemote('NoteBook');
//tmpObj := CoCoSysInfoObj.Create ;
tmpObj.GetMyComputerName(cName);
tmpObj.GetSysDate(SDate);
tmpObj.GetSysTime(STime);
memo1.Clear ;
memo1.Lines.Add(cName);
memo1.Lines.Add(SDate);
memo1.Lines.Add(STime);
tmpobj := nil;当执行代码时,总是提示“拒绝访问”请教各位三层高手,该如何配置服务器的访问规则啊????