Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!shum.Huji.AC.IL!oferf From: oferf@shum.Huji.AC.IL (ofer faigon) Newsgroups: comp.windows.ms Subject: Process priorities in win386 ? Summary: How can a forground process yield to a background one? Message-ID: <351@shuldig.huji.ac.il> Date: 6 Jun 89 00:35:47 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: oferf%shum.UUCP@humus.Huji.AC.IL (ofer faigon) Organization: Hebrew University of Jerusalem, ISRAEL Lines: 36 Hello, I have a problem regarding process priorities in Windows/386: I have two programs - one is a Windows aplication (W), the other a DOS application (D). I want to run them together, with W visible and covering the whole screen and D in the background. At certain times (T) D has to get all or most of the CPU cycles, without popping into view. I tried using several methods: 1 - use the 386 API function, whose description I found in Online, to terminate the current time-slice every time W gets the CPU during T. 2 - call SetPriority(GetProcessId(),...) in W at the beginning/end of T. 3 - call WaitMessage in W during T. 4 - use Yield(). (1), (3) and (4) seem to be doing absolutely nothing, based on run time measurements. (2) hangs the machine - no response to mouse or keyboard events. I played with this a little and found that the hanging occurs whenever there is ANY DOS applic in the bacground, but not when there are only Windows applics. I am using the run-time environment of Windows/386 2.11, but W is linked with the library of an older SDK (I don't have it here now; I think it is ver 2.1) What can I do? Thanks, Ofer. P.S. I do not have easy access to Online; Please do not send me there... - Ofer Faigon TEL: +972-2-669-834 MAIL: P.O.B 7347, Jerusalem 91072, ISRAEL BITNET: oferf@HUJINIX CSNET & INTERNET: oferf@shum.huji.ac.il