4D v16.3

Gestalt

Home

 
4D v16.3
Gestalt

Gestalt 


 

Gestalt ( selector ; value ) -> Function result 
Parameter Type   Description
selector  String in 4-character gestalt selector
value  Longint in Gestalt result
Function result  Longint in Error code result

The Gestalt command returns in value a numeric value that denotes the characteristics of your system hardware and software, depending on the selector you pass in selector.

If the requested information is obtained, Gestalt returns 0 in function result; otherwise, it returns the error -5550. If the selector is unknown, Gestalt returns the error -5551.

Important: The Gestalt Manager is part of Mac OS. On Windows, some of the selectors are also implemented, but the usefulness of this command is limited.

For more information about the selectors that you can pass to Gestalt, refer to the Apple Developer documentation related to the Gestalt Manager, available on-line at the following address: http://developer.apple.com/documentation/Carbon/Reference/Gestalt_Manager/index.html

Example  

Using version 10.4.11 of Mac OS, the following code displays the alert “You're running system version 0x1049”:

 $vlErrCode:=Gestalt("sysv";$vlInfo)
 If($vlErrCode=0)
    ALERT("You're running system version "+String($vlInfo;"&x"))
 End if

 
PROPERTIES 

Product: 4D
Theme: System Environment
Number: 488

This command modifies the Error system variableThis command can be run in preemptive processesThis command has platform-specific behavior

 
HISTORY 

Created: 4D v6

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)