ADVAPI32: Make service_start_process return the pid to the caller

Rolf Kalbermatter r.kalbermatter at hccnet.nl
Tue Apr 24 15:00:00 CDT 2007


James Hawkins [mailto:truiken at gmail.com] wrote:
>
>On 4/24/07, Rolf Kalbermatter <r.kalbermatter at hccnet.nl> wrote:
>> Changelog
>>   dlls/advapi32/service.c
>>    - Make service_start_process return the pid to the caller
>>
>
>-        /* FIXME: Put the pid into the service struct */
>+        if (ppid) *ppid = pi.dwProcessId;
>
>The fixme says to put the pid in the service struct, not return it in
another parameter.

That is going to be the next step. The FIXME was just a remark moved by me
in a
previous patch so I would not forget about it. Since I have no direct access
to the
service_data struct in the service_start_process() function but indirectly
in the
caller of this function, I decided to do it in this way instead of trying to
directly
poke it somehow in the correct service_data struct.

There are two problems left with implementing this:

1) I'm not sure if I should just add this PID as an extra field to the
WINESERV_STARTINFO
message or add an extra WINSERVE_SETPID message to be sent after the
WINESERVE_STARTINFO
message. Creating an extra WINSERVE_SETPID message would be cleaner in my
opinion but a
bit of overkill maybe, while adding it to WINESERVE_STARTINFO would need
some extra fiddling
with the message length parameter. I couldn't come up with a clean and neat
way for this
solution yet and don't want to hack something here.

2) Real world has had some influence on my time schedule to work as much on
this as I
would have liked.

Rolf Kalbermatter




More information about the wine-devel mailing list