ReplaceGestalt
OSType selector ; Gestalt selector code ProcPtr selectorFunction ; address of new selector function ProcPtr *oldGestaltFunction ; address of current selector function associated with a selector.
selector is the code that is about to have its function replaced(see
codes).
selectorFunction is the new function Gestalt will associate with the selector.
oldGestaltFunction is the function currently associated with the selector and
about to be replaced
noErr (0) No error
gestaltUndefSelectorErr (-5551) Un defined selector
gestaltLocationErr (-5553) Function not in system heap
Notes: The new function must reside in the system heap and may want to call the
function previously associated with the named selector. It may do so by
using the address returned in the oldGestaltFunction.
Under THINK C 5.0 or later, THINK Pascal 4.0 or later and MPW 3.2 or
language, it is necessary to check for the existence of the