Function

SetGestaltValue

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

Declaration

OSErr SetGestaltValue(OSType selector, SInt32 newValue);

Parameters

selector

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

newValue

The new Gestalt value for the selector code.

Return Value

A result code. See Gestalt Manager.

Discussion

You use SetGestaltValue to establish a value for a selector, without regard to whether the selector was already installed.

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