cd ../../Random Posts

Getting the System Version [UNSTABLE]

1 minute read

Windows API Sets mechanism is introduced by Microsoft from Windows 7. Also, PEB structure has new field ApiSetMap:

1

ApiSetMap is a pointer to another structure _API_SET_NAMESPACE:

2

According to lucasg’s post Version value is different on Windows 7, Windows 8.1 and Windows 10, which means we can use this field to get Windows system version:

3

Example:

NOTE: It’s not recommended to use this method in a production product, there is a much stable way from MSDN using Version API Helper functions;