title: WaitForSingleObject gives Invalid Handle
body: <pre><code>h=CreateFile("c:\\test.txt",GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_READONLY|FILE_FLAG_OVERLAPPED,NULL);
  
      OVERLAPPED ol2;
      memset(&amp;ol2,0,sizeof(OVERLAPPED));
      ol2.hEvent=CreateEvent(NULL,false,false,NULL);
      if(!ReadFile(h,iobuffer+pointsize,value,NULL,&amp;ol2))
      printf("Last Error %u",GetLastError());
      if(WaitForSingleObject(&amp;ol2.hEvent,INFINITE)!=0){
          printf("Last Error %u \n",GetLastError());
  
      }
  </code></pre>
  
  <p>WaitForsingleobject returns invalid handle, yet I do not see why...</p>