[PATCH 6/7] kernel32: Resolve an indirect string in time zone names.
Alexandre Julliard
julliard at winehq.org
Thu Dec 6 06:07:12 CST 2018
Akihiro Sagawa <sagawa.aki at gmail.com> writes:
> On Wed, 05 Dec 2018 19:45:20 +0100, Alexandre Julliard wrote:
>> > @@ -1807,3 +1807,99 @@ BOOL WINAPI UpdateResourceA( HANDLE hUpdate, LPCSTR lpType, LPCSTR lpName,
>> > if(!IS_INTRESOURCE(lpName)) RtlFreeUnicodeString(&NameW);
>> > return ret;
>> > }
>> > +
>> > +/******************************************************************************
>> > + * load_string [Internal]
>> > + *
>> > + * This is basically a copy of advapi32/reg.c's load_string. Necessary to
>> > + * avoid importing user32, which is higher level than kernel32. Helper for
>> > + * following load_indirect_string.
>> > + */
>> > +static int load_string(HINSTANCE hModule, UINT resId, LPWSTR pwszBuffer, INT cMaxChars)
>> > +{
>>
>> You should probably use RegLoadMUIStringW instead of duplicating this
>> code.
>
> Is it safe to call advapi32 functions from kernel32?
> From my point of view, kernel32 doesn't import advapi32 functions at
> this point.
It has been moved to kernelbase.dll in recent versions, we should do the
same, then it could be used from anywhere. In the meantime I think
loading it explicitly from advapi32 would be acceptable.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list