procedure TForm1.OpenComm;
var
cc:TCOMMCONFIG;
Temp:string;
begin
  Temp:='COM'+inttostr(radiogroup1.ItemIndex+1);
  hComm:=createfile(pchar(temp),GENERIC_read or generic_write,0,nil,open_existing,0,0);
  if(hComm=invalid_handle_value)
  then
    messagedlg('打开通信端口错误',mterror,[mbok],0);
    exit;
  end;
  getcommstate(hComm,cc.dcb)
  cc.dcb.baudrate:=CBR_9600;  
  cc.dcb.bytesize:=8;
  cc.dcb.parity:=noparity;
  cc.dcb.stopbits:=onestopbit;
  cc.dcb.flags:=1;
  if not setcommstate(hcomm,cc.dcb) then
    begin
    messagebox(0,'通信端口设置错误','',mb_ok);
    closehandle(hcomm);
    exit;
    end;
end;编译的时候这里报错:getcommstate(hComm,cc.dcb)