Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 2 - Scrap Manager / Scrap Manager Reference
Routines / Transferring Data Between the Scrap in Memory and the Scrap on Disk


LoadScrap

You can use the LoadScrap function to read the scrap from the scrap file into memory.

FUNCTION LoadScrap: LongInt;
DESCRIPTION
The LoadScrap function allocates memory in your application's heap to hold the scrap and then reads the scrap from the scrap file into memory. The scrap file is located in the System Folder of the startup volume and has the filename (usually "Clipboard") as indicated by the scrapName field of the scrap information record. If the scrap is already in memory, LoadScrap does nothing.

LoadScrap returns as its function result a long integer corresponding to a result code.

SPECIAL CONSIDERATIONS
The LoadScrap function may move or purge memory blocks in the application heap. Your application should not call this function at interrupt time.

RESULT CODES
noErr0No error
ioErr-36I/O error
memFullErr-108Not enough memory in heap zone

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996