[PATCH 6/7] kernel32: Resolve an indirect string in time zone names.

Akihiro Sagawa sagawa.aki at gmail.com
Thu Dec 6 07:04:38 CST 2018


On Thu, 06 Dec 2018 13:07:12 +0100, Alexandre Julliard wrote:
> 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.

That's sounds good. I'll prepare revised patch.

Akihiro Sagawa




More information about the wine-devel mailing list