title: c++ check if file is empty
body: <p>I got a project in C++ which I need to edit. This is a declaration of variable:</p>
  
  <pre><code>// Attachment
      OFSTRUCT ofstruct;
      HFILE hFile = OpenFile( mmsHandle-&gt;hTemporalFileName , &amp;ofstruct , OF_READ );
      DWORD hFileSize = GetFileSize( (HANDLE) hFile , NULL );
      LPSTR hFileBuffer = (LPSTR)GlobalAlloc(GPTR, sizeof(CHAR) * hFileSize );
      DWORD hFileSizeReaded = 0;
      ReadFile( (HANDLE) hFile , hFileBuffer, hFileSize, &amp;hFileSizeReaded, NULL );
      CloseHandle( (HANDLE) hFile );
  </code></pre>
  
  <p>I need to check if the file is attached (I suppose I need to check if hFile has any value), but don't know how. I tried with <code>hFile == NULL</code> but this doesn't do the job.</p>
  
  <p>Thanks,<br>
  Ile</p>