咏南中间件修正了一处BUG,调用中间件插件会报:非法访问
将以下方法修改成如下的代码即可
function TServerMethods1.GetSvrData(const accountNo, defineId: WideString; inParams: OleVariant): OleVariant;
// 调用中间件的插件
// defineId=3位插件编号+2位自定义编号
var
p: TfrmPlugBase;
plugClass: string;
ps: TPersistent;
begin
Result := null;
try
// 从内存表获取类名,通过defineId
plugClass := GetPlugClass(defineId);
if plugClass = ‘‘ then
Exit;
// 还原出插件,通过类名
ps := FindClass(plugClass).Create;
if not assigned(ps) then
exit;
p := TfrmPlugBase(ps);
if Assigned(p) then
Result := p.GetSvrData(accountNo, defineId, inParams);
except
on e: Exception do
begin
Result := null;
Log.WriteLog(‘TServerMethods1.GetSvrData ‘ + e.Message);
end;
end;
end;
时间: 2024-10-22 22:45:21