mirror of
https://github.com/WinDurango/WinDurango.git
synced 2026-01-05 10:49:44 -06:00
Fix OS version minor calculation and error macro
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
#define RtlSetLastWin32ErrorAndNtStatusFromNtStatus(Status) \
|
||||
SetLastError(RtlNtStatusToDosError(Status))
|
||||
#define RtlGetLastWin32ErrorAndNtStatusFromNtStatus(Status) \
|
||||
GetLastError(RtlNtStatusToDosError(Status))
|
||||
(SetLastError(RtlNtStatusToDosError(Status)), GetLastError())
|
||||
|
||||
@@ -229,7 +229,7 @@ void GetSystemOSVersion_X(LPSYSTEMOSVERSIONINFO VersionInformation) {
|
||||
int edx = cpuInfo[3];
|
||||
|
||||
VersionInformation->MajorVersion = LOBYTE(ebx); // Lowest 8 bits of EBX
|
||||
VersionInformation->MinorVersion = HIBYTE(HIDWORD(eax)); // Highest 8 bits of EAX
|
||||
VersionInformation->MinorVersion = HIBYTE(HIWORD(eax)); // Highest 8 bits of EAX
|
||||
|
||||
VersionInformation->Revision = LOWORD(edx); // Lowest 16 bits of EDX
|
||||
VersionInformation->BuildNumber = LOWORD(eax); // Lowest 16 bits of EAX
|
||||
|
||||
Reference in New Issue
Block a user