线程引发access violation的错误
//连接FTP的procedure TFtpThread.Execute;begin FreeOnTerminate := True; if not FtpConnState then begin FtpConnState := ConnFtp(MainForm.FtpLibrary,UserName,PassWord); SendMessage(MainForm.Handle,WM_CONNFTP,Integer(PChar(FtpConnState)),0); end;end;//上传文件的procedure TUpLoadThread.Execute;begin FreeOnTerminate := True; if not FtpConnState then begin MainForm.FtpLibrary.RemotePath :='446\1.txt'; MainForm.FtpLibrary.LocalPath:='c:\1.txt'; MainForm.FtpLibrary.Upload; end;end;