Function

NewGestaltValue

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

Declaration

OSErr NewGestaltValue(OSType selector, SInt32 newValue);

Parameters

selector

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

newValue

The value to return for the new selector code.

Return Value

A result code. See Gestalt Manager.

Discussion

You call the function NewGestaltValue when the specified selector is not already installed and you don't want to override an existing value.

In macOS, the new selector and 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
SetGestaltValue

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

Deprecated
ReplaceGestaltValue

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

Deprecated
DeleteGestaltValue

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

Deprecated