Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!purdue!mailrus!cornell!calvin!richard From: richard@calvin.EE.CORNELL.EDU (Richard Brittain) Newsgroups: comp.sys.ibm.pc Subject: How do you find out a program name (argv[0]) in DOS Message-ID: <1147@calvin.EE.CORNELL.EDU> Date: 4 Jul 89 18:55:50 GMT Distribution: comp Organization: Cornell Space Plasma Physics, Ithaca, NY Lines: 15 Hello, can anyone explain how to find out the name of a program under DOS 3+ (i.e. how does C set argv[0]). I know it isn't possible for earlier version of DOS, and I have actually looked at the Turbo-C startup code, but it doesn't seem to make much sense. Turbo-C seems to look beyond the end of the environment block, but I can't find anything there. What I actually want to do is to find out the name of a program, given it's PSP address. thanks Richard Brittain, School of Elect. Eng., Upson Hall Cornell University, Ithaca, NY 14853 ARPA: richard@calvin.spp.cornell.edu UUCP: {uunet,uw-beaver,rochester,cmcl2}!cornell!calvin!richard