c - Windows API STARTUPINFO destroyed? -


After creating a process and waiting to complete it, is it STARTUPINFO still available or is it deleted? has given? STARTUPINFO si; BRes = Create process (zero, command, zero, zero, true, 0, zero, faucet, and SI, and PI); DwRes = WaitForSingleObject (pi.hProcess, INFINITE);

After this, si is modified / destroyed or is it retained?

Windows copies the startup information straight to the new process. This should be because the new process has a new address space and can not see your structure.

Now, what happens to your structure? Well, the answer is that the parameter is annotated like this:

  _In_LPSTARTUPINFO lpStartupInfo   

_In _ means that The content of the structure is not modified CreateProcess to call, therefore, you can trust that when CreateProcess returns, the startup information structure has not been modified.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -