[Mono-dev] Re: [PATCH] ShellExecuteEx ProcessId support forWindows 2000 and Windows XP RTM

Kornél Pál kornelpal at gmail.com
Sat Apr 8 11:02:19 EDT 2006


Hi,

For detailed information please refer to my previous message (included in 
this one).

> The GetProcessId check should remain in configure.in, and
> HAVE_GETPROCESSID be used by the code to check if its available or not.
> Remember, check for features not platforms.

We have a single binary for all supported Windows versions so we can't rely 
on actual feature set (or we should use LoadLibrary and GetProcaddress 
instead of static linking with run-time feature detection). Furthermore 
Windows header files are universal (for more information please read my 
previous post).

io-layer's GetProcessId can be used anywhere io-layer is used (anything but 
Windows). GetProcessId is not present on all Windows versions we support but 
NtQueryInformationProcess is supported on all of them. io-layer checks for 
platform as well so this is consistent. As such there is no need to have 
HAVE_GETPROCESSID.

Also note that your current code is never calling GetProcessId on Windows 
because _WIN32_WINNT is never set to 0x0502 or greater. So your current code 
is simply not working at all on Windows.

> Check that interdependencies between msvcrt.dll and ntdll.dll can be
> _reliably_ solved by the link order.

My second (corrected) patch submitter right after my first one does this.

> Then I'll review an updated patch.

I resubmit the same patch (diff against the most recent SVN revision). 
Please review it. If you find any problems or have any objections please let 
me know otherwise please approve it.

Thanks.

Kornél

----- Original Message ----- 
From: "Kornél Pál" <kornelpal at gmail.com>
To: "Dick Porter" <dick at ximian.com>; <mono-devel-list at lists.ximian.com>
Sent: Wednesday, April 05, 2006 3:12 AM
Subject: Re: [Mono-dev] Re: [PATCH] ShellExecuteEx ProcessId support
forWindows 2000 and Windows XP RTM


> Hi,
>
> I'm only unsure about the configure part when specifying library (DLL)
> dependencies. I know that the solution is the link order but I don't know
> how to solve it. The submitted patch is correct but I'm not sure whether
> it is the best solution. I'm not going to submit another patch as I don't
> know other solution. If you have a better one please let me know.
>
> I consider the actual code patch to be complete, stable and safe so I'm
> not going to modify it either.
>
> I'm confident regarding modifications made to process.c. I'm sure that
> modifications made to configure.in are correct but there may be some other
> solution as well.
>
> Checking for GetProcessId in header files is a bad idea as Windows
> (Platform SDK) header files are universal so if you define the appropriate
> WINVER (and/or _WIN32_WINNT, _WIN32_WINDOWS, _WIN32_IE) version you can
> link to the API (including GetProcessId) of that version regardless of the
> Windows version in use. Unlike the header files of Linux header files of
> Windows are not describing the actual operating system version.
>
> But anyway this new code is not using GetProcessId on Windows and is using
> io-layer's implementation everywhere else so there is no need to check for
> GetProcessId.
>
> Kornél
>
> ----- Original Message ----- 
> From: "Dick Porter" <dick at ximian.com>
> To: <mono-devel-list at lists.ximian.com>
> Sent: Tuesday, April 04, 2006 2:18 PM
> Subject: Re: [Mono-dev] Re: [PATCH] ShellExecuteEx ProcessId support
> forWindows 2000 and Windows XP RTM
>
>
> On Tue, 2006-04-04 at 12:01 +0200, Kornél Pál wrote:
>> Could someone please review this patch.
>
> I was on holiday, and you didn't seem too confident about this patch
> anyway; but here goes:
>
> The GetProcessId check should remain in configure.in, and
> HAVE_GETPROCESSID be used by the code to check if its available or not.
> Remember, check for features not platforms.
>
> Check that interdependencies between msvcrt.dll and ntdll.dll can be
> _reliably_ solved by the link order.
>
> Then I'll review an updated patch.
>
> Thanks,
>
> - Dick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pid.diff
Type: application/octet-stream
Size: 2588 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060408/9c00778b/attachment.obj 


More information about the Mono-devel-list mailing list