NewGestaltYou can use the
NewGestaltfunction to add a selector code to those already recognized by
FUNCTION NewGestalt (selector: OSType; gestaltFunction: SelectorFunctionUUP) : OSErr;
- The selector code you're adding, which is a four-character sequence of type
- A pointer to the selector function that
Gestaltexecutes when it receives the new selector code.
NewGestaltfunction registers a specified selector code with the Gestalt Manager so that when
Gestaltis called with that selector code, the specified selector function is executed. The function result of
NewGestaltis a result code.
NewGestalt, you must define a selector function and install it in the system heap. The selector function must conform to the interface defined in "Adding a New Selector Code" beginning on page 1-10.
Registering with the Gestalt Manager is a way for software such as system extensions to make their presence known to potential users of their services.
NewGestaltfunction might move memory and should not be called at interrupt time.
ASSEMBLY-LANGUAGE INFORMATIONThe registers on entry and exit for the
Registers on entry A0 Address of new selector function D0 Selector code
Registers on exit D0 Result code
noErr 0 No error memFullErr -108 Ran out of memory gestaltDupSelectorErr -5552 Selector already exists gestaltLocationErr -5553 Function not in system heap
SEE ALSOSee "Adding a New Selector Code" beginning on page 1-10 for a sample selector function and a sample procedure that installs it. For information about the
Gestaltfunction, see page 1-31.