function TYxxtWebService.SelectDataSet(selectstr: string; TableName: string; 
  Para: TYXParameter): System.Data.DataSet;
type
  TArrayOfSystem_Object = array of System.Object;
var
  results: TArrayOfSystem_Object;
begin
  results := Self.Invoke('SelectDataSet', TArrayOfSystem_Object.Create(selectstr, 
          TableName, Para));
  Result := (System.Data.DataSet(results[0]));
end;请问一下delphi2005下这个函数的意思
希望是逐条讲解一下另外重点讲解一下Self.Invoke个函数是做什么用的??
还有Self.EndInvoke  和 Self.BeginInvoke这两个函数
实在是很没头绪。

解决方案 »

  1.   

    Provides access to Automation properties and methods exposed by an object that supports the IDispatch interface.Delphi syntax:type HResult = Longint;
    function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer; Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall;C++ syntax:virtual HRESULT __stdcall Invoke(int DispID, const GUID &IID, int LocaleID, Word Flags, void *Params, void * VarResult, void * ExcepInfo, void * ArgErr);DescriptionInvoke implements the IDispatch interface Invoke method. Invoke is the standard mechanism for accessing the exposed properties and methods of an Automation object. Invoke calls the Invoke method for the interface represented by the TAutoObject, passing it the parameters specified by the function.
      

  2.   

    调用WEBSERVICE里的“SelectDataSet”方法
      

  3.   

    TYxxtWebService.SelectDataSet,定义的比较明显,SelectDataSet为webservice中的函数
      

  4.   

    function TYxxtWebService.CallYwMethod(Para: TYXParameter; MethodName: string; 
      ClassName: string): TExportResult;
    type
      TArrayOfSystem_Object = array of System.Object;
    var
      results: TArrayOfSystem_Object;
    begin
      results := Self.Invoke('CallYwMethod', TArrayOfSystem_Object.Create(Para, 
              MethodName, ClassName));
      Result := (TExportResult(results[0]));
    end;再问下,这个函数是么意思,麻烦耐心讲解一下好不
    调用语名为:
    var  cs : TDk_Cgyhsj;
         t_out : TexportResult;
    ...
    t_out := xtService.CallYwMethod(cs,'Dk_CgYhsj','TYwcl_Sfgl_Dk');
    麻烦耐心讲解一下好不谢谢
      

  5.   

    调用WebService中叫CallYwMethod的方法。这个方法有三个参数:cs是业务参数(估计是你们系统的自定义变量),Dk_CgYhsj是方法名,TYwcl_Sfgl_Dk是类名。至于这个方法干什么的,只好你自己去问主管了。
      

  6.   

    Dk_CgYhsj是方法名这个意思是知道,具体是想知道这个 Dk_CgYhsj 方法 定义在什么地方呢??
    TYwcl_Sfgl_Dk 这个类又定义在什么地方呢?找好久都没找着