How to Copy / Move Files

Posted December 15th @ 8:50 pm by m3Rlin

Delphi’s runtime library does not provide any routines for copying or moving files. However, you can directly call the Windows API CopyFile() function to copy a file. CopyFile() is also useful when moving files across drives because neither Delphi’s RenameFile() function nor the Windows API MoveFile() function can rename/move files across drives.
!!Note: The file attributes [...]

How to Run a DOS Program

Posted December 15th @ 8:42 pm by m3Rlin

You can run DOS (and Windows) programs using the Windows API WinExec() function.

WinExec(’C:\\NC.exe’, SW_NORMAL); { DOS program }

WinExec(’notepad.exe’, SW_MAXIMIZED); { Windows program started in maximized form }
For Win32 program you should use the CreateProcess() function although there will be no problems when you use this one.

« Previous EntriesNext Entries »