Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!usc!zaphod.mps.ohio-state.edu!ncar!noao!arizona!scp From: scp@cs.arizona.edu ( Purcell) Newsgroups: comp.os.msdos.programmer Subject: Re: Help needed for sharing common data between programs Summary: Try the ICA Message-ID: <24616@megaron.cs.arizona.edu> Date: 27 Aug 90 04:12:58 GMT References: <1990Aug9.042244.6@ux1.cso.uiuc.edu> Distribution: comp.os.msdos.programmer Organization: U of Arizona CS Dept, Tucson Lines: 29 In article deadog@kk4fs.UUCP (Dead Dog) writes: >klg0582@uxa.cso.uiuc.edu (Ken-Huang Lin) writes: > >> I would like to have some "global variables" remain alive even after the >> program ends so that the next program can access them. I tried to set >> environment variables inside the program using >> system("set v=..."); >> in Turbo C. Unfortunately, the effect is only local to that program. Is >> there any way to set the global environment variables in a program? Or is >> there a better way to serve the same purpose? > >There is a way you can search backward through memory blocks and find the >"real" environment table, but there is a much better way. Write the >variables into a file... If you don't need to share a lot of variables, you might try the Intra-Application Communications Area, 16 bytes starting at 0040:00F0h. I've successfully used this area to return extended status info from child programs to their parent. See page 62 of Norton's Programmer's Guide for more info (not much more, though). Good Luck... Sean -------------------------------------------------------------------------------- Sean Purcell : scp@cs.arizona.edu : "Never underestimate the bandwidth of a station wagon..." --------------------------------------------------------------------------------