[4/4] version: Replace kernel32 translation info in non-US locales.

Alexandre Julliard julliard at winehq.org
Tue Feb 14 07:36:36 CST 2017


Akihiro Sagawa <sagawa.aki at gmail.com> writes:

> On Tue, 14 Feb 2017 10:18:51 +0100, Alexandre Julliard wrote:
>> Akihiro Sagawa <sagawa.aki at gmail.com> writes:
>> > @@ -1078,6 +1086,67 @@ BOOL WINAPI VerQueryValueW( LPCVOID pBlock, LPCWSTR lpSubBlock,
>> >      return VersionInfo32_QueryValue(info, lpSubBlock, lplpBuffer, puLen, NULL);
>> >  }
>> >  
>> > +/* replace translation info as some apps requires localised info from kernel32 */
>> > +/* replace translation info as some apps requires localised info from kernel32 */
>> > +static void replace_translation_info( void *info, DWORD len )
>> > +{
>> > +    static const WCHAR product_nameW[] = {'\\','S','t','r','i','n','g',
>> > +                                          'F','i','l','e','I','n','f','o',
>> > +                                          '\\','0','4','0','9','0','4','B','0',
>> > +                                          '\\','P','r','o','d','u','c','t',
>> > +                                          'N','a','m','e',0};
>> > +    static const WCHAR original_filenameW[] = {'\\','S','t','r','i','n','g',
>> > +                                               'F','i','l','e','I','n','f','o',
>> > +                                               '\\','0','4','0','9','0','4','B','0',
>> > +                                               '\\','O','r','i','g','i','n','a','l',
>> > +                                               'F','i','l','e','n','a','m','e',0};
>> > +    static const WCHAR wineW[] = {'W','i','n','e', 0};
>> > +    static const WCHAR kernel32W[] = {'k','e','r','n','e','l','3','2','.','d','l','l',0};
>> 
>> That's very hackish, we need a more general solution.
>
> How about introducing target DLL list in the registry, as seen in DLL
> overrides? Or, do you mean MUI files, like kernel32.dll.mui?

They should be normal resources, there shouldn't be any need to modify
them after loading. We probably don't need separate MUI files, so the
resources can all be in the main file, just like we do for other
resource types.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list