Good evening (morning/afternoon/night). Write a program using WinAPI. In particular, the function
ShellExecute. This programme is a console application that passes the parameters (output STDERR stream to a text file).
At the command prompt, write this:
program.exe -2>err.txt
In your code you write:
ShellExecute(handle, 'open', 'program.exe', '-2>err.txt', nil, SW_SHOW);
Without parameters ('-2>err.txt') the program is run, the error displays in the console. And with options also shows in the console, although you need to file.
What is the error? How can you do better?