UnicodeString templateSavePath = ChangeFileExt(ExtractFilePath(Application->ExeName),"tmp.doc");
 IdAntiFreeze1->OnlyWhenIdle = false;//设置使程序有反应.
 TMemoryStream *templateStream ;
 templateStream = new TMemoryStream() ;

 try {
  IdHTTP1->Get("http://localhost/shaj.synadmin/tmp.doc", templateStream);
 } catch (...) {

 }


 templateStream->SaveToFile(templateSavePath);
 delete templateStream;

posted on 2011-04-07 17:52  袁晓平  阅读(248)  评论(0编辑  收藏  举报