copyfile函数(20分)

S

strang

Unregistered / Unconfirmed
GUEST, unregistred user!
请问COPYFILE函数使用时,第三个参数应该如何设置?
 
P

pegasus

Unregistered / Unconfirmed
GUEST, unregistred user!
That's easy, :)
The prototype of CopyFile() is:

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
);

bFailExists
指示系统当目标文件存在时如何处理
如果其值为TRUE并且文件存在, 函数失败退出.
如果其值为FALSE并且文件存在,目标文件将被覆盖, 函数成功返回.
(当然如果目标文件并不存在, 这个参数的值就不影响函数的操作)
 
顶部