Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!mailrus!rutgers!mtunx!mtune!westmark!dave From: dave@westmark.UUCP (Dave Levenson) Newsgroups: comp.sys.ibm.pc Subject: Re: Program Loaded Where? from inside another Message-ID: <154@westmark.UUCP> Date: 22 Apr 88 19:24:39 GMT References: <39@softart.UUCP> Organization: Westmark, Inc., Warren, NJ, USA Lines: 19 In article <39@softart.UUCP>, riml@softart.UUCP (Research in Motion Limited) writes: ... > I have a program which invokes another program via an exec-type call > ("system()" in C). In mess-dos so far, this means your calling program > goes away until the new program has done its stuff. My calling program > needs to know where the called program got loaded in memory. Does > anyone have any hints on how to do this? I suggest that the calling program pass to the called program (as a command line argument, or an environment setting) a far pointer to a global variable. The called program can than put a pointer to itself (or its PSP or whatever you meant by the above) in the location indicated by said pointer. When it returns control to the caller, the caller can find out where the called program was. -- Dave Levenson Westmark, Inc. The Man in the Mooney Warren, NJ USA {rutgers | clyde | mtune | ihnp4}!westmark!dave