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: Apple Guide Complete / Part 3 - Integrating Guide Files
Chapter 9 - Apple Guide API / Opening and Closing Guide Files
/


AGClose

Use the AGClose function to close a specified guide file.

AGErr AGClose(AGRefNum *resultRefNum);
resultRefNum
A pointer to the reference number for the guide file you wish to close.
DESCRIPTION
The AGClose function closes the guide file specified in the resultRefNum parameter. You use AGClose to close a guide file that was opened by your application. If you attempt to close a guide file that was opened by another application, the AGClose function returns a nonzero result code. Note that a call to AGClose does not quit Apple Guide; it continues to run in the background.

If your application opens a guide file, it should always close the guide file and call AGQuit before quitting. Otherwise, if the application portion of Apple Guide is active or sleeping, it remains in memory.

SPECIAL CONSIDERATIONS
Don't close an open guide file or force Apple Guide to quit when your application goes to the background. If your application has opened a guide file and the user switches to another application, your guide file should remain open until the user closes it, opens another guide file, or quits your application.

RESULT CODES
noErr0No error
kAGErrDatabaseNotOpen-2957Guide file is not open
kAGErrInvalidRefNum-2960The guide file was opened by another application
SEE ALSO
For a description of the AGQuit function, see page 9-6.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
12 JUL 1996