Function

ReplaceGestaltValue

Replaces the value that the function Gestalt returns for a specified selector code with the value provided to the function.

Declaration

OSErr ReplaceGestaltValue(OSType selector, SInt32 replacementValue);

Parameters

selector

The selector code you want to add. This should be a four-character sequence similar to those defined in Constants.

replacementValue

The replacement Gestalt value for the selector code.

Return Value

A result code. See Gestalt Manager.

Discussion

You use the function ReplaceGestaltValue to replace an existing value. You should not call this function to introduce a value that doesn't already exist; instead call the function NewGestaltValue.

In macOS, the selector and replacement value are on a per-context basis. That means they are available only to the application or other code that installs them. You cannot use this function to make information available to another process.

See Also

Getting and Setting Gestalt Selector Codes and Values

Gestalt

Obtains information about the operating environment.

Deprecated
NewGestaltValue

Installs a new Gestalt selector code and a value that Gestalt returns for that selector.

Deprecated
SetGestaltValue

Sets the value the function Gestalt will return for a specified selector code, installing the selector if it was not already installed.

Deprecated
DeleteGestaltValue

Deletes a Gestalt selector code so that it is no longer recognized by Gestalt.

Deprecated