CreateFile returns INVALID_HANDLE_VALUE when it fails, not HFILE_ERROR. Added comments.
Attach a file by drag & drop or click to upload