Skip to content

Commit

Permalink
exchndl: Print Windows version.
Browse files Browse the repository at this point in the history
Fixes #16.
  • Loading branch information
jrfonseca committed Jun 9, 2015
1 parent be27056 commit ce050da
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/exchndl/exchndl.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,20 @@ void GenerateExceptionReport(PEXCEPTION_POINTERS pExceptionInfo)
}
}

lprintf(_T("DrMingw %u.%u.%u\r\n\r\n"),
// TODO: Use GetFileVersionInfo on kernel32.dll as recommended on
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724429.aspx
// for Windows 10 detection?
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof osvi);
osvi.dwOSVersionInfoSize = sizeof osvi;
GetVersionEx(&osvi);
lprintf(_T("Windows %lu.%lu.%lu\r\n"),
osvi.dwMajorVersion, osvi.dwMinorVersion, osvi.dwBuildNumber);

lprintf(_T("DrMingw %u.%u.%u\r\n"),
PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCH);

lprintf(_T("\r\n"));
}

#include <stdio.h>
Expand Down

0 comments on commit ce050da

Please sign in to comment.