Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: Operating System Utilities /
Chapter 1 - Gestalt Manager / Gestalt Manager Reference
Application-Defined Routines / The Selector Function


MySelectorFunction

The selector function is responsible for placing the requested information in the response parameter and returning an appropriate error code.

FUNCTION MySelectorFunction (selector: OSType; 
                             VAR response: LongInt): OSErr;
selector
The selector code that triggers the function.
response
On exit, the information.
DESCRIPTION
The selector function places the requested information in the response parameter and returns a result code. If the information is not available, the selector function returns the appropriate error code, which Gestalt returns as its function result.

A selector function can call Gestalt or even other selector functions. It must reside in the system heap.

ASSEMBLY-LANGUAGE INFORMATION
The registers on entry and exit for the selector function are
Registers on entry
D0Selector code
Registers on exit
A0Response
D0Result code

RESULT CODES
noErr0No error
gestaltUnknownErr-5550Could not obtain the response
SEE ALSO
See "Adding a New Selector Code" beginning on page 1-10 for a sample selector function and a procedure that installs it in the system heap. For information about the NewGestalt function, see page 1-34. For information about the ReplaceGestalt function, see page 1-35.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice