Anstatt des Suchpfad des Parent-Prozesses zu verpfuschen,
wäre es bestimmt schöner das Environment als Parameter an CreateProcess zu übergeben.
Not sure about how nicer it will be (nicer is what translation gave me), see if Environment block is nil then process called with CreateProcess will use the parent process, if you to fill or pass anything in CreateProcess then it will be used instead of the default, meaning you should pass the same as parent process, or you are in lot of missing variables and default paths, and here comes the headache,..
Reading the Environment to pass it from parent to child, the block in whole should be read and passed, and it will be in this structure
Zitat:
name=value\0
Yes each variable will be null-terminated line, handling this is ... well doable but avoidable, and i prefer to avoid messing and parsing so much null-terminated lines, just to find PATH variable and then add my paths, then pass it with CreateProcess.
So, no.. (for me at least) it is not nicer at all.