title: How set limited time when calling CreateFile to open a serial port "comX"?
body: <p>I have a bluetooth serial port to communicate with hardwares. If the hardware does not power on, using "CreateFile" will make thread blocked and cause a error "The semaphore timeout period has expired" after 5-6 seconds. 
  Is it possible to spend less time getting the result of using "CreateFile" by setting timeout-time ?
  Thank you.</p>