## wb_get_system_info

mixed wb_get_system_info (string info)

Returns information about the current system and application, according to the string info. The parameter info is not case-sensitive.

# Available information

The available values of info are in the table below.

info | Meaning | Type | Example
--- | --- | --- | ---
"appmemory" | The total memory used by the application¹ | integer | 4653056
"backgroundcolor" | The main face color for Windows dialog boxes and controls | integer | 14215660
"colordepth" | The current color depth in bits per pixel | integer | 32
"commandline" | The original Windows command line including the executable file | string | C:\PHP\PHP5\php.exe C:\PHP\code\test.phpw
"computername" | The name of the computer inside the network | string | PICASSO
"consolemode" | 1 indicates that console mode (DOS box) is active, 0 otherwise | integer | 0
"diskdrives" | The list of all available disk drives | string | A: C: D: E:
"exepath" | The path to the main executable (PHP.EXE) | string | C:\PHP\PHP5\
"fontpath" | The current font path | string | C:\Windows\Fonts\
"freememory" | The available physical memory | integer | 71950336
"gdiobjects" | The number of currently allocated GDI handles | integer | 25
"instance" | The instance identifier of the current application | integer | 4194304
"osnumber" | The numeric OS version number | string | 5.1
"ospath" | The current OS path | string | C:\Windows\
"osversion" | The complete OS version name | string | Microsoft Windows XP Home Edition Service Pack 2 (build 2600)
"pgmpath" | The default OS application path | string | C:\Program Files\
"screenarea" | The total area (x, y, width, height) of the screen, in pixels | string | 0 0 1280 960
"systemfont" | The common (default) system font for dialog boxes | string | Tahoma 8 Regular
"systempath" | The OS system path | string | C:\Windows\System\
"temppath" | The path used by the OS to hold temporary files | string | C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\
"totalmemory" | The total physical memory installed | string | 200785920
"username" | The name of the currently logged user | string | Admin
"userobjects" | The number of currently allocated USER handles | integer | 7
"workarea" | The valid area (x, y, width, height) of the screen, in pixels | string | 0 0 1280 926

¹ For "appmemory", the function will always return 0 in Windows 98 or Windows Me.

If info is not one of the above values, a warning message will be displayed and the function will return `NULL`.

# Tips

In certain cases where the return value is a string with several sub-strings, use the explode() function to separate values. Examples:

`// Get font data values $sfnt = explode(" ", wb_get_system_info("systemfont")); $sysfont = wb_create_font($sfnt[0], $sfnt[1], BLACK, constant(strtoupper("FTA_$sfnt[2]")));` `// Get screen dimensions $dim = explode(" ", wb_get_system_info("screenarea")); wb_message_box(null, "Screen dimensions are $dim[2] x $dim[3] pixels.");`

# See also

System functions