Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!munnari.oz.au!metro!wolfen!cs.uow.edu.au!stephen From: stephen@cs.uow.edu.au (The Mighty Ogbo) Newsgroups: comp.sys.mac.programmer,aus.mac Subject: Re: Danger Will Robinson, traps for young player. Message-ID: <1990Aug20.033702.5883@cs.uow.edu.au> Date: 20 Aug 90 03:37:02 GMT References: <11591@wehi.dn.mu.oz> Organization: Ta Taern Lines: 23 JON@wehi.dn.mu.oz (Jon Eaves) writes: >I want to extract the UserName from the Chooser. No problems, just use >tempHandle = GetString(CHOOSERNAME), then how do I get the "string" from >the tempHandle. The process I was using was > strcpy(tempString,PtoCstr((char *)(*tempHandle)); >Great, this sets tempString correctly. BUT, the Chooser Name field gets >mangled because the resource handle is now in 'C' string format. >When the application exits, the resource map is saved and the System >becomes unstable (Got the 'Cant Load the Finder', bomb !!) I believe a call to DetachResource() would be useful here. It unlinks the information in memory from the resource itself. This way you can go and play with the memory copy quite happily and not accidently screw your resource. > Jon Eaves ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| Stephen Nicholson (The Mighty Ogbo) stephen@wraith.cs.uow.edu.au "Rooster of a Fightin' Stock / Would you let a Saecsen cock Crow out upon an Irish Rock / Fly up an teach him manners!" - Planxty |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||