version: Fix error in win 9x mode when a file was not found in GetFileVersionInfoSize.

Dmitry Timoshkov dmitry at baikal.ru
Sun Apr 30 04:20:28 CDT 2017


Nikolay Sivov <bunglehead at gmail.com> wrote:

> > @@ -705,7 +705,12 @@ DWORD WINAPI GetFileVersionInfoSizeExW( DWORD flags, LPCWSTR filename, LPDWORD h
> >          return (len * 2) + 4;
> >  
> >      default:
> > -        SetLastError( lzfd == HFILE_ERROR ? ofs.nErrCode : ERROR_RESOURCE_DATA_NOT_FOUND );
> > +        if (lzfd == HFILE_ERROR)
> > +            SetLastError(ofs.nErrCode);
> > +        else if (GetVersion() & 0x80000000)
> > +            SetLastError(ERROR_FILE_NOT_FOUND);
> > +        else
> > +            SetLastError(ERROR_RESOURCE_DATA_NOT_FOUND);
> >          return 0;
> >      }
> >  }
> > 
> 
> What depends on this? Is this function actually exported on Win9x? If
> not this fixup should happen in actual affected export I think.

While GetFileVersionInfoSizeExW is not exported in win9x indeed,
GetFileVersionInfoSizeW is exported, and since GetFileVersionInfoSizeW
is just a forward to GetFileVersionInfoSizeExW it shouldn't matter in
practice where win9x specific behaviour is actually implemented.

-- 
Dmitry.



More information about the wine-devel mailing list