![]() |
#6 |
Участник
|
Весь текст:
static void Job123(Args _args) { str sMsg; sMsg = WinAPI::copyFile_FRM('D:\\2776.dbf', 'D:\\Clients\\TempFile.dbf', true ); box::info(sMsg); } client server static str copyFile_FRM(str fileName, str newFileName, boolean bFailIfExists = TRUE) { DLL _winApiDLL = new DLL('KERNEL32'); DLLFunction _copyFile = new DLLFunction(_winApiDLL, 'CopyFileA'); Int iErr; str sErrMsg = ""; _copyFile.returns(ExtTypes: ![]() _copyFile.arg(ExtTypes::String, ExtTypes::String, ExtTypes: ![]() if (_copyFile.call(fileName, newFileName, bFailIfExists ) == 0) { iErr = WinAPI::getLastError(); sErrMsg = WinAPI::formatMessage(iErr) ; } return sErrMsg; } |
|