Overview
simple_system provides SCOOP-compatible system information access for Eiffel applications. It wraps Win32 system APIs through a clean C interface, enabling queries about the computer, processor, memory, and operating system without threading complications.
Part of the simple_* ecosystem of focused, single-purpose Eiffel libraries.
Quick Start
Installation
<library name="simple_system" location="$SIMPLE_EIFFEL/simple_system/simple_system.ecf"/>
Basic Usage
local
sys: SIMPLE_SYSTEM
do
create sys
-- Computer info
print ("Computer: " + sys.computer_name + "%N")
print ("User: " + sys.user_name + "%N")
-- Directories
print ("Windows: " + sys.windows_directory + "%N")
print ("Temp: " + sys.temp_directory + "%N")
-- Processor info
print ("CPUs: " + sys.processor_count.out + "%N")
print ("Architecture: " + sys.processor_architecture + "%N")
print ("64-bit: " + sys.is_64_bit.out + "%N")
-- Memory info
print ("Total RAM: " + sys.total_memory_gb.out + " GB%N")
print ("Available: " + sys.available_memory_gb.out + " GB%N")
-- OS info
print ("OS Version: " + sys.os_version_string + "%N")
print ("Windows 11: " + sys.is_windows_11.out + "%N")
end
Features
Computer Info
Computer name, user name
Directories
Windows, System32, Temp directories
Processor
Count, architecture, page size
Memory
Total and available in MB/GB
API Reference
Computer Information
| Feature | Description |
|---|---|
computer_name | Name of the computer |
user_name | Name of the current user |
Directory Information
| Feature | Description |
|---|---|
windows_directory | Windows installation directory (C:\Windows) |
system_directory | System directory (C:\Windows\System32) |
temp_directory | Temporary files directory |
Processor Information
| Feature | Description |
|---|---|
processor_count | Number of logical processors |
processor_architecture | "x86", "x64", "ARM64", or "unknown" |
is_64_bit | Is the processor 64-bit? |
page_size | Memory page size in bytes |
Memory Information
| Feature | Description |
|---|---|
total_memory_mb | Total physical memory in megabytes |
available_memory_mb | Available physical memory in megabytes |
total_memory_gb | Total physical memory in gigabytes |
available_memory_gb | Available physical memory in gigabytes |
OS Information
| Feature | Description |
|---|---|
os_major_version | OS major version number |
os_minor_version | OS minor version number |
os_build_number | OS build number |
os_version_string | Full OS version (e.g., "10.0.22631") |
is_windows_10_or_later | Is this Windows 10 or later? |
is_windows_11 | Is this Windows 11? (Build 22000+) |