🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #282

Unwanted Multitasking!!

#282
From: J|rgen Longva
Date: Fri, 10 Apr 1992 13:36
40 lines
1651 bytes
Hi!

I'm writing a windos-program that must call external .exe-files during
it's runtime. I use WinExec(...) to do this, but there is a small prob-
lem with this method: the Windows program does not stop!

The external routine must pass data back to the windows-program, and I
use the hard disk as a buffer:

  // Executes the external routine.
  if (WinExec("routine.exe", SW_HIDE) < 32)
    --> Error

  // Reads the information returned by the external routine.
  if ((file = _open("info.txt", O_RDWR)) == -1)
    --> Error

  ...

The problem is that the main-program continues to run - and reaches the
line where I open the result-file too early. I've made a .pif-file for
the externl routine that checks the "Exclusive"-flag for priority.

How can I check when the external routine is finished? Is there an al-
ternative to WinExec(...) (the LoadModule(...) does only work for win-
dows .exe-files)?

I must find a solution to this quickly, as this problem delays a whole
project.

Thanks for any help.

-- 
Regards,

J|rgen Longva <jlongva@lise.unit.no>

Student of technology
University of Trondheim
Norway.
Technical Details
Message-ID: <1992Apr10.133656.28981@ugle.unit.no>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!micro-heart-of-gold.mit.edu!bloom-beacon!eru.mt.luth.se!lunic!sunic!ugle.unit.no!siri.unit.no!jlongva

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!micro-heart-of-gold.mit.edu!bloom-beacon!eru.mt.luth.se!lunic!sunic!ugle.unit.no!siri.unit.no!jlongva
From: jlongva@Siri.Unit.NO (J|rgen Longva)
Newsgroups: comp.windows.ms.programmer,comp.windoes.ms
Subject: Unwanted Multitasking!!
Message-ID: <1992Apr10.133656.28981@ugle.unit.no>
Date: 10 Apr 92 13:36:56 GMT
Sender: news@ugle.unit.no (NetNews Administrator)
Reply-To: jlongva@Siri.Unit.NO (J|rgen Longva)
Organization: University of Trondheim
Lines: 40