Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!ogicse!zephyr.ens.tek.com!gvgpsa!treehouse!andyp From: andyp@treehouse.UUCP (Andy Peterman) Newsgroups: comp.sys.mac.programmer Subject: Re: Determining whether MultiFinder is present Message-ID: <572@treehouse.UUCP> Date: 10 Oct 90 05:24:36 GMT References: <10540.270e461f@amherst.bitnet> Organization: The Tree House Lines: 29 In article <10540.270e461f@amherst.bitnet> mbabramowicz@amherst.bitnet writes: >Tech Notes seem to say that you can't determine whether or not Multifinder is >present. But Font/DA Mover seems to know whether it's present ... This seems to come up every few months and there always seem to be a multitude of hack answers. Well, here's a way to determine if MF is active that I've been using for 3 years and it continues to work flawlessly! I asked DTS about this method a few years ago and I don't think I ever got a straight answer, which to me means they couldn't find much wrong with it. Here's the C fragment: ... WindowPtr window; Boolean mfActive = TRUE; GetWMgrPort (&window); if (PtrZone ((Ptr)window) == GetZone()) mfActive = FALSE; ... Basically, it determines if the Window Manager port is in the same heap as your application. If it is, then MultiFinder is NOT running. This is basically a legal (i.e. supported) set of tests. Do not use the WM port (window) if MultiFinder is active. Andy Peterman treehouse!andyp@gvgpsa.gvg.tek.com