我用Delphi的WSDL IMPORTEL映射了Webservice接口函数.调用正常.
可是将其封装在DLL里却出错.提示为:"Olesyserror 尚未调用 CoInitialize".
?????
请各位执教一下.

解决方案 »

  1.   

    也许DELPHI的WS部分用到COM的什么东东(估计是MS的XMLPARSER),所以你在DLL里时要用加上CoInitialize调用,它定义在ActiveX单元里
      

  2.   


    应该是加上CoInitialize,CoUninitialize;在你的借口单元试试// ************************************************************************ //
    // The types declared in this file were generated from data read from the
    // WSDL File described below:
    // WSDL     : http://127.0.0.1/isapiserverdll/Psarp.dll/wsdl/IDownLoad
    // Version  : 1.0
    // (2003-8-25 17:45:34 - $Revision:   1.9.1.0.1.0.1.9  $)
    // ************************************************************************ //unit IDownLoad1;interfaceuses InvokeRegistry, Types, XSBuiltIns,inifiles,strutils,ActiveX;type..........
    initialization
      CoInitialize(nil);//ADD THIS
      InvRegistry.RegisterInterface(TypeInfo(IDownLoad), 'urn:Udownload-IDownLoad', '');
      InvRegistry.RegisterDefaultSOAPAction(TypeInfo(IDownLoad), 'urn:Udownload-IDownLoad#%operationName%');end.