function getbook:Integer;stdcall;
var
  WsObj:HosServicePortType;
begin
  try
    CoInitialize(Nil);
    WsObj:=MainForm.HTTPRIO1 as HosServicePortType;//引用Mainform上的HTTPRIO控件
    WsArray:=WsObj.getBook('0371001','20100302');//发送请求(getbook是webservice中的函数)
  finally
    CoUninitialize;
  end;
   Result:=0;
end;
。省略
procedure TMainForm.FormShow(Sender: TObject);
var i:Integer;
    ARegistry:TRegistry;
    ID: DWORD;
begin
   hThread := CreateThread(nil, 0, @getbook, nil,0, ID);//这样产生进程
......省略
我想在线程中实线后台自动发送请求,但是一直提示错误:Thread Start: Thread ID: 1732. Process HosClient.exe (3436)
First chance exception at $7C812AFB. Exception class ESOAPHTTPException with message 'The handle is in the wrong state for the requested operation - URL:http://192.168.0.100:8080/crm_pt/service/HosService?wsdl - SOAPAction:""'. Process HosClient.exe (3436)不知道什么原因,我刚开始学习线程,网上查了很多资料都学不来~请求帮助。