调用接口简便方法


先定义:

 TCallExpressionForPublic =
     procedure(var id, Express, ExpressRemark,SubStr: string);stdcall;
//
调用表达式记录选择编辑窗口


实现中:

procedure TBaStopResumeQryFrm.BitBtn1Click(Sender: TObject);
var
  DefHModule : HMODULE;
  DirStr : String;
  ParamID : string;
  ParamExpress,ParamExpressRemark,ParamSubStr :string;
begin
  inherited;
  DirStr := Extractfilepath(ParamStr(0))+'Modules\';
  DefHModule := LoadPackAge(DirStr+'OrdSchdl.bpl');
  if DefHModule <> 0 then
  begin
    TCallExpressionForPublic(
      GetProcAddress(DefHModule,'CallExpressionForPublic'))(ParamID,ParamExpress,ParamExpressRemark,ParamSubStr);
  end;
//调用表达式记录选择编辑窗口
{procedure CallExpressionForPublic(var id, Express, ExpressRemark,SubStr: string); stdcall;//表达式选择

exports  CallExpressionForPublic; }
end;

posted on 2004-09-19 16:28  Null  阅读(768)  评论(0)    收藏  举报