From: Craig Lanning [mailto:CraigL@DyCon.com]
At 10:42 PM 10/15/99 +0200, Adrian Aichner wrote:
>>>>>> "Jonathan" == Jonathan Harris
<jhar(a)tardis.ed.ac.uk> writes:
>
> Jonathan> How about using WaitForSingleObject(pid, 1/10s) instead
>
>Hi Jonathan, Craig, All!
>
>Could someone who knows please confirm whether WaitForSingleObject()
>will work on Windows9[58]?
The book that I have ("Win32 System Programming" by Johnson M. Hart)
indicates that WaitForSingleObject() works for NT/95/98. (I
don't do any
windows programming so I can't answer from personal experience.)
The book's got it right. WaitForSingleObject() does work for all Win32
platforms.
>According to MSDN I have to OpenProcess() with SYNCHRONIZE right
on
>WindowsNT. Windows9[58] does not seem to have this access right. So
>I guess I have to open without it there.
This book does not identify SYNCHRONIZE as an NT only option
so it should
work with 95/98.
The SYNCHRONIZE right is new with Windows 2000. It doesn't exist on NT 3.51,
or NT 4. In any event it doesn't matter since the easiest way to do this is
just to use PROCESS_ALL_ACCESS that way you can do whatever you want with
the called process. (it includes the SYNCHRONIZE right in the bitmask in the
Win2k headers)
Bill