Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!ucdavis!iris!lim From: lim@iris.ucdavis.edu (Lloyd Lim) Newsgroups: comp.sys.mac.programmer Subject: Re: Question for THINK C gurus Message-ID: <8695@ucdavis.ucdavis.edu> Date: 3 Apr 91 23:00:19 GMT References: <3142@murtoa.cs.mu.oz.au> Sender: usenet@ucdavis.ucdavis.edu Reply-To: lim@iris.ucdavis.edu (Lloyd Lim) Organization: U.C. Davis - Department of Electrical Engineering and Computer Science Lines: 19 In article <3142@murtoa.cs.mu.oz.au> rob@cs.mu.oz.au (Robert Wallen) writes: >If I am using Think-C, is there some way I can tell which mode of object is >being produced? i.e. is there some sort of > >#if defined(APPL) || defined(DESKACC) || defined(DRIVER) || defined(RSRC) >#endif This doesn't answer your question but it's related and may come in useful some day. Sometimes it's useful to know when you are running from a project or a built application. If Count1Resources('CODE') is 0, then you're running from a project. I need to know this because my apps checksum themselves after they are first built and then check themselves at subsequent startups for viruses. Obviously, I don't want this to happen when it's a project. +++ Lloyd Lim Internet: lim@iris.eecs.ucdavis.edu America Online: LimUnltd Compuserve: 72647,660 US Mail: 215 Lysle Leach Hall, U.C. Davis, Davis, CA 95616