title: CreateProcess and WaitForSingleObject fails on the second of two PDF files
body: <p>All</p>
  
  <p>I use CreateProcess and WaitForSingleObject in Delphi 2007 to open files and wait for them to be closed. 
  I have found that when I open two PDF files in a row, the second WaitForSingleObject returns immediately. I have also found that this happens for jpg and tif files but not txt files. Also the second PDF takes 10 seconds longer to open than if opened by itself!
  It also happens on both Vista and XP, and on a range of computers.
  Am I using CreateProcess incorrectly or is it something else?</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>Regards</p>
  
  <p>Bob</p>