Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!usc!rutgers!rochester!pt.cs.cmu.edu!ralf From: ralf+@cs.cmu.edu (Ralf Brown) Newsgroups: comp.os.msdos.programmer Subject: Re: How can a TSR detect if it has been installed? Message-ID: <13599@pt.cs.cmu.edu> Date: 24 Jun 91 02:09:47 GMT References: <1991Jun23.145337.20537@netcom.COM> <4944@gumby.Altos.COM> Organization: School of Computer Science, Carnegie Mellon Lines: 21 In article <4944@gumby.Altos.COM> jesse@gumby.Altos.COM (Jesse Chisholm AAC-RjesseD) writes: }Many TSRs chain their interrupt and so it might be installed but no longer }be the first in the chain. A way of checking for the signature you mention }that gets around this is to check at that offset for ALL segments from 0000 }up to your current CS. when you find the signature if the segment is not }equal to the current CS, then your TSR has been installed before and is still }in memory. If the first time you find the signature is in your current }CS segment, then your TSR has not yet been installed. Go for it. That will fail on an increasing number of machines, because more and more people are loading things high (particularly now that DOS5 is out). The only acceptably reliable method for determining prior installation is to reserve a call for an installation check. Not 100% foolproof, either, but it can be made arbitrarily reliable by returning a pointer to a signature string--the longer the string, the less likelihood of a clash. -- {backbone}!cs.cmu.edu!ralf ARPA: RALF@CS.CMU.EDU FIDO: Ralf Brown 1:129/53 BITnet: RALF%CS.CMU.EDU@CARNEGIE AT&Tnet: (412)268-3053 (school) FAX: ask DISCLAIMER? Did | It isn't what we don't know that gives us trouble, it's I claim something?| what we know that ain't so. --Will Rogers