The functions in this section are used to retrieve information about the current computer and/or user characteristics.
::wxGetEmailAddress
::wxGetFreeMemory
::wxGetFullHostName
::wxGetHomeDir
::wxGetHostName
::wxGetOsDescription
::wxGetOsVersion
::wxIsPlatformLittleEndian
::wxIsPlatform64Bit
::wxGetUserHome
::wxGetUserId
::wxGetUserName
wxString wxGetEmailAddress()
bool wxGetEmailAddress(char * buf, int sz)
Copies the user's email address into the supplied buffer, by concatenating the values returned by wxGetFullHostName and wxGetUserId.
Returns true if successful, false otherwise.
Include files
<wx/utils.h>
wxMemorySize wxGetFreeMemory()
Returns the amount of free memory in bytes under environments which support it, and -1 if not supported or failed to perform measurement.
Include files
<wx/utils.h>
wxString wxGetFullHostName()
Returns the FQDN (fully qualified domain host name) or an empty string on error.
See also
Include files
<wx/utils.h>
wxString wxGetHomeDir()
Return the (current) user's home directory.
See also
Include files
<wx/utils.h>
wxString wxGetHostName()
bool wxGetHostName(char * buf, int sz)
Copies the current host machine's name into the supplied buffer. Please note that the returned name is not fully qualified, i.e. it does not include the domain name.
Under Windows or NT, this function first looks in the environment variable SYSTEM_NAME; if this is not found, the entry HostName in the wxWidgets section of the WIN.INI file is tried.
The first variant of this function returns the hostname if successful or an empty string otherwise. The second (deprecated) function returns true if successful, false otherwise.
See also
Include files
<wx/utils.h>
wxString wxGetOsDescription()
Returns the string containing the description of the current platform in a user-readable form. For example, this function may return strings like Windows NT Version 4.0 or Linux 2.2.2 i386.
See also
Include files
<wx/utils.h>
wxOperatingSystemId wxGetOsVersion(int *major = NULL, int *minor = NULL)
Gets the version and the operating system ID for currently running OS. See wxPlatformInfo for more details about wxOperatingSystemId.
See also
::wxGetOsDescription, wxPlatformInfo
Include files
<wx/utils.h>
bool wxIsPlatformLittleEndian()
Returns true if the current platform is little endian (instead of big endian). The check is performed at run-time.
See also
Include files
<wx/utils.h>
bool wxIsPlatform64Bit()
Returns true if the operating system the program is running under is 64 bit. The check is performed at run-time and may differ from the value available at compile-time (at compile-time you can just check if sizeof(void*)==8) since the program could be running in emulation mode or in a mixed 32/64 bit system (bi-architecture operating system).
Very important: this function is not 100% reliable on some systems given the fact that there isn't always a standard way to do a reliable check on the OS architecture.
Include files
<wx/utils.h>
const wxChar * wxGetUserHome(const wxString& user = "")
Returns the home directory for the given user. If the username is empty (default value), this function behaves like wxGetHomeDir.
Include files
<wx/utils.h>
wxString wxGetUserId()
bool wxGetUserId(char * buf, int sz)
This function returns the "user id" also known as "login name" under Unix i.e. something like "jsmith". It uniquely identifies the current user (on this system).
Under Windows or NT, this function first looks in the environment variables USER and LOGNAME; if neither of these is found, the entry UserId in the wxWidgets section of the WIN.INI file is tried.
The first variant of this function returns the login name if successful or an empty string otherwise. The second (deprecated) function returns true if successful, false otherwise.
See also
Include files
<wx/utils.h>
wxString wxGetUserName()
bool wxGetUserName(char * buf, int sz)
This function returns the full user name (something like "Mr. John Smith").
Under Windows or NT, this function looks for the entry UserName in the wxWidgets section of the WIN.INI file. If PenWindows is running, the entry Current in the section User of the PENWIN.INI file is used.
The first variant of this function returns the user name if successful or an empty string otherwise. The second (deprecated) function returns true if successful, false otherwise.
See also
Include files
<wx/utils.h>