AGClosefunction to close a specified guide file.
AGErr AGClose(AGRefNum *resultRefNum);
- A pointer to the reference number for the guide file you wish to close.
AGClosefunction closes the guide file specified in the
resultRefNumparameter. You use
AGCloseto 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
AGClosefunction returns a nonzero result code. Note that a call to
AGClosedoes 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
AGQuitbefore quitting. Otherwise, if the application portion of Apple Guide is active or sleeping, it remains in memory.
SPECIAL CONSIDERATIONSDon'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.
noErr 0 No error kAGErrDatabaseNotOpen -2957 Guide file is not open kAGErrInvalidRefNum -2960 The guide file was opened by another application
SEE ALSOFor a description of the
AGQuitfunction, see page 9-6.