function ExecuteFile(const FileName, Params, DefaultDir: string; ShowCmd: Integer): THandle;var zFileName, zParams, zDir: array[0..79] of Char; begin Result := ShellExecute(Application.MainForm.Handle, nil,StrPCopy(zFileName, FileName), StrPCopy(zParams, Params),StrPCopy(zDir, DefaultDir), ShowCmd);end; |
Пример вызова:
executeFile('maker.exe','text_file','c:\maker', SW_SHOWNORMAL); |