The Old New Thing

WaitForInputIdle should really be called WaitForProcessStartupComplete

The function waits for a process to finish its initialization, which is determined when it reaches a state where it is just sitting around waiting for messages. The documentation for doesn't even get around to the initialization part until the Remarks section. If all you read is the one-sentence summary, Waits until the specified process is...