1704 }
1705
1706 // Invoke callback function
1707 result = callback(filename, (address)modinfo.lpBaseOfDll,
1708 (address)((u8)modinfo.lpBaseOfDll + (u8)modinfo.SizeOfImage), param);
1709 if (result) break;
1710 }
1711
1712 CloseHandle(hProcess);
1713 return result;
1714 }
1715
1716 void os::print_os_info_brief(outputStream* st) {
1717 os::print_os_info(st);
1718 }
1719
1720 void os::print_os_info(outputStream* st) {
1721 st->print("OS:");
1722
1723 os::win32::print_windows_version(st);
1724 }
1725
1726 void os::win32::print_windows_version(outputStream* st) {
1727 OSVERSIONINFOEX osvi;
1728 VS_FIXEDFILEINFO *file_info;
1729 TCHAR kernel32_path[MAX_PATH];
1730 UINT len, ret;
1731
1732 // Use the GetVersionEx information to see if we're on a server or
1733 // workstation edition of Windows. Starting with Windows 8.1 we can't
1734 // trust the OS version information returned by this API.
1735 ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
1736 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
1737 if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
1738 st->print_cr("Call to GetVersionEx failed");
1739 return;
1740 }
1741 bool is_workstation = (osvi.wProductType == VER_NT_WORKSTATION);
1742
1743 // Get the full path to \Windows\System32\kernel32.dll and use that for
|
1704 }
1705
1706 // Invoke callback function
1707 result = callback(filename, (address)modinfo.lpBaseOfDll,
1708 (address)((u8)modinfo.lpBaseOfDll + (u8)modinfo.SizeOfImage), param);
1709 if (result) break;
1710 }
1711
1712 CloseHandle(hProcess);
1713 return result;
1714 }
1715
1716 void os::print_os_info_brief(outputStream* st) {
1717 os::print_os_info(st);
1718 }
1719
1720 void os::print_os_info(outputStream* st) {
1721 st->print("OS:");
1722
1723 os::win32::print_windows_version(st);
1724
1725 #ifdef _LP64
1726 VM_Version::print_platform_virtualization_info(st);
1727 #endif
1728 }
1729
1730 void os::win32::print_windows_version(outputStream* st) {
1731 OSVERSIONINFOEX osvi;
1732 VS_FIXEDFILEINFO *file_info;
1733 TCHAR kernel32_path[MAX_PATH];
1734 UINT len, ret;
1735
1736 // Use the GetVersionEx information to see if we're on a server or
1737 // workstation edition of Windows. Starting with Windows 8.1 we can't
1738 // trust the OS version information returned by this API.
1739 ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
1740 osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
1741 if (!GetVersionEx((OSVERSIONINFO *)&osvi)) {
1742 st->print_cr("Call to GetVersionEx failed");
1743 return;
1744 }
1745 bool is_workstation = (osvi.wProductType == VER_NT_WORKSTATION);
1746
1747 // Get the full path to \Windows\System32\kernel32.dll and use that for
|