Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!decwrl!ucbvax!bloom-beacon!eru!kth.se!cyklop.nada.kth.se!news From: d88-jwa@byse.nada.kth.se (Jon W{tte) Newsgroups: comp.sys.mac.programmer Subject: Re: Question for THINK C gurus Message-ID: Date: 4 Apr 91 08:20:08 GMT References: <3142@murtoa.cs.mu.oz.au> <8695@ucdavis.ucdavis.edu> Sender: news@nada.kth.se (Mr News) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 19 In-reply-to: lim@iris.ucdavis.edu's message of 3 Apr 91 23:00:19 GMT In article <8695@ucdavis.ucdavis.edu> lim@iris.ucdavis.edu (Lloyd Lim) writes: 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. So, of course, the virus just patches _Count1Resources to return 0 for CODE (and no, you can't check if it's patched, since there may be legitimate patches to it too...) h+@nada.kth.se Jon W{tte -- "The IM-IV file manager chapter documents zillions of calls, all of which seem to do almost the same thing and none of which seem to do what I want them to do." -- Juri Munkki in comp.sys.mac.programmer