Important: The information in this document is obsolete and should not be used for new development.
MySelectorFunction
The selector function is responsible for placing the requested information in theresponse
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 theresponse
parameter and returns a result code. If the information is not available, the selector function returns the appropriate error code, whichGestalt
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 D0 Selector code
Registers on exit A0 Response D0 Result code RESULT CODES
noErr 0 No error gestaltUnknownErr -5550 Could 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 theNewGestalt
function, see page 1-34. For information about theReplaceGestalt
function, see page 1-35.