Skip to content
/ Process Public

Simple wrapper for CreateProcess function

Notifications You must be signed in to change notification settings

lobtao/Process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Process

Simple wrapper for CreateProcess function

Example

var
  process: IProcess;
  result: boolean;

begin
  result := TProcess.New('notepad.exe')
    .CommandLineArgs()
      .Arg('input.txt')
      .Build()
    .Flags(NORMAL_PRIORITY_CLASS)
    .StartInfo()
      .Flags(STARTF_USESHOWWINDOW or STARTF_FORCEONFEEDBACK)
      .ShowWindow(SW_SHOWNORMAL)
      .Build()
    .TryStart(process);

  if result then
  begin
    process.WaitForInputIdle(INFINITE);
    Writeln(process.ProcessId);
    process.WaitForExit(INFINITE);
  end;
end.

About

Simple wrapper for CreateProcess function

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages