Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!husc6!endor!siegel From: siegel@endor.harvard.edu (Rich Siegel) Newsgroups: comp.sys.mac.programmer Subject: Re: SFGetFile Message-ID: <2288@husc6.harvard.edu> Date: 20 Mar 90 12:51:32 GMT References: <3830@sage.cc.purdue.edu> Sender: news@husc6.harvard.edu Reply-To: siegel@endor.UUCP (Rich Siegel) Organization: Symantec Language Products Group Lines: 27 In article <3830@sage.cc.purdue.edu> ar4@sage.cc.purdue.edu (Piper Keairnes) writes: >Got a problem folks... what's wrong with this simple code??? > >int handleDialog(theItem, dp) Bzzt. Dialog hooks, filters, and all other Toolbox callbacks have to be declared "pascal", since the Toolbox doesn't know to call them with the C conventions. Upon return of your function, the stack is getting misaligned. You're also getting the wrong results within your hook because the arguments are getting passed in the reverse of what the routine expects. R. ~~~~~~~~~~~~~~~ Rich Siegel Staff Software Developer Symantec Corporation, Language Products Group Internet: siegel@endor.harvard.edu UUCP: ..harvard!endor!siegel "When someone who makes four hundred and fifty dollars an hour wants to tell you something for free, it's a good idea to listen." ~~~~~~~~~~~~~~~