home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!destroyer!gatech!concert!borg.cs.unc.edu!not-for-mail
- From: lari@cs.unc.edu (Humayun Lari)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Calling external code resources - how?
- Date: 25 Jan 1993 12:10:32 -0500
- Organization: The University of North Carolina at Chapel Hill
- Lines: 18
- Message-ID: <1k16u8INNd36@strauss.cs.unc.edu>
- References: <01050014.odph61@blanc.north.de> <1993Jan25.005216.12749@kth.se>
- NNTP-Posting-Host: strauss.cs.unc.edu
-
- In article <1993Jan25.005216.12749@kth.se> d88-jwa@dront.nada.kth.se (Jon WΣtte) writes:
- [deleted]
- >you call 'em like:
- >
- > Handle h = GetResource ( 'Xtns' , 128 ) ; /* Whatever */
- > HLockHi ( h ) ;
- > result = ( * h ) ( theCode , theInData , theOutData ) ;
- [rest deleted]
-
- It's a good idea to StripAddress the pointer first, say:
- funcPtr = StripAddress(*h);
- result = funcPtr(theCode, theInData, theOutData);
-
- This is really only necessary if the code resource will call SwapMMUMode,
- but it's better to be safe...
-
- Humayun Lari
- (lari@cs.unc.edu)
-