BDE 4.14.0 Production release
|
Provide utilities related to the operating system.
This component provides a namespace, bdls::OsUtil
, containing utility functions for retrieving information at runtime about the operating system in which this task is running.
This section illustrates intended use of this component.
The following example demonstrates using getOsInfo
to obtain information about the operating system at runtime and writing it to the console.
First, we create strings for the operating system name (osName
), version (osVersion
), and patch (osPatch
), and then call getOsInfo
to load these strings with values for the operating system the task is executing in:
Then, we use the standard streams to write the operating system version information to the console, or an error message of failure:
Finally, the resulting console output on the Red Hat Enterprise Linux Server 5.5 would be
On Windows 7 SP1, the display would be