Differences between ShellExecute, shellexecuteex, winexec, and CreateProcess:
Winexec is the easiest to use. This feature provides 16-bit Windows compatibility. It is estimated that ShellExecute is called internally.
The difference between ShellExecute and shellexecuteex is that shellexecuteex can return the handle of the newly created process. ShellExecute immediately calls closehandle after the process is created to close the New Process Handle, while shellexecuteex will return the new program handle.
ShellExecute not only opens files on the machine, but also the Internet site address.
CreateProcess should be the basis for implementation of ShellExecute/shellexecuteex.
Note: Call CreateProcess/shellexecuteex to return the New Process Handle (CreateProcess also returns the master thread handle of the new process). If you do not need to access these kernel objects, you should immediately call closehandle to close these handles, otherwise, even if the new process terminates the execution, the kernel objects in the saved State will not be cleared.