[PATCH v2 1/8] dllhost: Add stub implementation.

Dmitry Timoshkov dmitry at baikal.ru
Wed Feb 23 06:36:55 CST 2022


Huw Davies <huw at codeweavers.com> wrote:

> On Tue, Feb 22, 2022 at 05:49:54PM +0300, Dmitry Timoshkov wrote:
> > +int WINAPI wWinMain(HINSTANCE hinst, HINSTANCE previnst, LPWSTR cmdline, int showcmd)
> > +{
> > +    HRESULT hr;
> > +    CLSID clsid;
> > +
> > +    CoInitializeEx(NULL, COINIT_MULTITHREADED);
> > +
> > +    hr = CLSIDFromString(cmdline, &clsid);
> 
> It looks like Windows uses the cmdline:
> 
> dllhost.exe /PROCESSID:{GUID}

MSDN's "Using the System-Supplied Surrogate" article
https://docs.microsoft.com/en-us/windows/win32/com/using-the-system-supplied-surrogate
and a pretty good guide for writing custom surrogate (which I follow in my work)
https://docs.microsoft.com/en-us/windows/win32/com/writing-a-custom-surrogate
they both mention only "CLSID on the launch command line".
Also the prototype patch attached to the bug
https://bugs.winehq.org/show_bug.cgi?id=20296 
passes just {GUID} on the command line.

Where do you see /PROCESSID mentioned for the surrogate process context?
Also it's not clear to me that /PROCESSID belongs to the hosted object,
and not something else, like really some process id.

Probably that's an internal implementation detail, and I'm open to use
whatever is deemed to be appropriate.

-- 
Dmitry.



More information about the wine-devel mailing list