调用接口问题(50分)

  • 主题发起人 主题发起人 wy91267
  • 开始时间 开始时间
W

wy91267

Unregistered / Unconfirmed
GUEST, unregistred user!
我用.net做了个接口 [WebMethod] &nbsp; //TeleRec[]<br>&nbsp; &nbsp; public TeleRec[] TransTeleRec(string EnteCode, string PWD, string TeleDate, string TeleNO, out int ExecRst)<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; if ((EnteCode.Trim() == "") || (PWD.Trim() == "") || (TeleDate.Trim() == "") || (TeleNO.Trim() == ""))<br>&nbsp; &nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ExecRst = 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return Array;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;ExecRst = 0; //传入参数不能为空<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return null;<br>&nbsp; &nbsp; &nbsp; &nbsp; }<br>我用WSDL importer导到delphi里<br>里面自动生成个 <br>procedure TransTeleRec(const EnteCode: WideString; const PWD: WideString; const TeleDate: WideString; const TeleNO: WideString; out TransTeleRecResult: ArrayOfTeleRec; out ExecRst: Integer); stdcall; <br>我如何使用这TransTeleRec方法?这么用呢
 
CreateComObject,CoCreateInstance可以创建一个对象或者返回一个接口引用,就看你的导入接口怎么给出了,其中一个最重要的参数就是class id ,接口里肯定有申明的
 
多人接受答案了。
 

Similar threads

后退
顶部