線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:1144
推到 Plurk!
推到 Facebook!

如何將指定的檔案copy至A 槽..............

答題得分者是:hagar
kenji
一般會員


發表:32
回覆:44
積分:20
註冊:2002-08-05

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-09-03 10:14:58 IP:61.225.xxx.xxx 未訂閱
如何將指定的檔案copy至A 槽..............
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#2 引用回覆 回覆 發表時間:2002-09-03 10:27:22 IP:211.22.xxx.xxx 未訂閱
ex:
begin
  if not        CopyFile(PChar('c:\xxx.txt'), PChar('a:\xxx.txt'), FALSE) then
    MessageDlg('Copy file failed', mtError, [mbOk], 0);
end;
kenji
一般會員


發表:32
回覆:44
積分:20
註冊:2002-08-05

發送簡訊給我
#3 引用回覆 回覆 發表時間:2002-09-03 10:48:20 IP:61.225.xxx.xxx 未訂閱
可不可問一下粉笨的問題,為什麼要用Pchar,那是啥東東丫~~~~~
hagar
版主


發表:143
回覆:4056
積分:4445
註冊:2002-04-14

發送簡訊給我
#4 引用回覆 回覆 發表時間:2002-09-03 11:21:59 IP:211.22.xxx.xxx 未訂閱
請看 CopyFile 這個 API 的宣告: BOOL CopyFile( LPCTSTR lpExistingFileName, // pointer to name of an existing file LPCTSTR lpNewFileName, // pointer to filename to copy to BOOL bFailIfExists // flag for operation if file exists ); 它傳入的前兩個參數解釋: Parameters lpExistingFileName Points to a null-terminated string that specifies the name of an existing file. lpNewFileName Points to a null-terminated string that specifies the name of the new file. PChar 代表的就是 null-terminated string
系統時間:2024-04-29 2:31:58
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!