Lua
C++
Edit

CreateProcess

This function launches an external executable and returns a handle that can be used for interaction.

Syntax

Parameters

Name Description
path file path of the executable to launch
commandline optional command line to pass to the program

Returns

If the program was launched a new process is returned, otherwise NULL is returned.

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    Print("Launching process");
#ifdef _WIN32
    auto proc = CreateProcess("C:/Windows/notepad.exe");
#endif
    Print("Process running");
    int exitcode = proc->Wait();
    Print("Process ended (" + String(exitcode) + ")");
    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.