[PATCH] combase: Execute local server for correct architecture in a WoW64 setup.

Dmitry Timoshkov dmitry at baikal.ru
Fri May 13 05:32:27 CDT 2022


Hi Huw,

many thanks for the review.

Huw Davies <huw at codeweavers.com> wrote:

> On Tue, Apr 26, 2022 at 03:40:05PM +0300, Dmitry Timoshkov wrote:
> > @@ -485,7 +488,11 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
> >      PROCESS_INFORMATION pinfo;
> >      LONG ret;
> >  
> > +    TRACE("Attempting to start server for %s\n", debugstr_guid(rclsid));
> > +
> >      hr = open_key_for_clsid(rclsid, L"LocalServer32", KEY_READ, &key);
> > +    if (FAILED(hr) && (arch == 64 || (IsWow64Process(GetCurrentProcess(), &is_wow64) && is_wow64)))
> > +        hr = open_key_for_clsid(rclsid, L"LocalServer32", opposite | KEY_READ, &key);
> >      if (FAILED(hr))
> >      {
> >          ERR("class %s not registered\n", debugstr_guid(rclsid));
> > @@ -511,7 +518,19 @@ static HRESULT create_server(REFCLSID rclsid, HANDLE *process)
> >  
> >      /* FIXME: Win2003 supports a ServerExecutable value that is passed into
> >       * CreateProcess */
> > -    if (!CreateProcessW(NULL, command, NULL, NULL, FALSE, DETACHED_PROCESS, NULL, NULL, &sinfo, &pinfo))
> > +    if (is_wow64 && arch == 64)
> 
> I'm confused, how can this condition ever be true?
> 
> Some tests for this would help.  It's a bit hard to do, but not
> impossible.

Looks like this is a typo, it should be 'if (is_wow64 || arch == 64)'.
Same typo slipped into create_surrogate_server().

-- 
Dmitry.



More information about the wine-devel mailing list