Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!earleh From: earleh@eleazar.dartmouth.edu (Earle R. Horton) Newsgroups: comp.sys.mac.programmer Subject: Re: Executing a code segement from Lightspeed Pascal? Message-ID: <10284@dartvax.Dartmouth.EDU> Date: 5 Oct 88 14:24:47 GMT References: <8810051239.AA09466@decwrl.dec.com> Sender: news@dartvax.Dartmouth.EDU Reply-To: earleh@eleazar.dartmouth.edu (Earle R. Horton) Organization: Thayer School of Engineering. Lines: 45 In article <8810051239.AA09466@decwrl.dec.com> harrow@bagels.dec.com (Jeff Harrow, NMSG LKG2-2/Y10 DTN=226-5564) writes: >I'm trying to use the HelpCompiler that came over Usenet. It >places help text and a CODE resource into a program, which you >call with the following "C" code: ... >Now, I tried to convert this to Pascal (Lightspeed, of course) as >follows: > >procedure ShowHelp; > var > rsrcH : Handle; > pp : ProcPtr; > > begin > if rsrcH = GetResource('code', 2000) then > begin > HLock(rsrcH); > pp := @rsrcH; > pp; <<<<