programing:cpp_builder:cpp_builder-get-windows-version
差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
| programing:cpp_builder:cpp_builder-get-windows-version [2020/02/06 10:32] – yoko | programing:cpp_builder:cpp_builder-get-windows-version [2026/07/28 13:16] (現在) – 外部編集 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | Windowsのバージョンを取得する | + | ====== |
| - | =========================== | + | |
| 最新のC++Builderでコンパイルすると、`GetVersionExW` 関数を使っていると以下の警告がでた。(今後推奨されない関数との事) | 最新のC++Builderでコンパイルすると、`GetVersionExW` 関数を使っていると以下の警告がでた。(今後推奨されない関数との事) | ||
| 行 8: | 行 7: | ||
| ``` | ``` | ||
| - | そこで対応について備忘録を残す。 | + | その対応について備忘録を残す。 |
| - | TOSVersion構造体を利用する | + | ===== TOSVersion構造体を利用 |
| - | ------------------------- | + | [[http:// |
| - | Windowsバージョンを以下の方法で取得。 | + | |
| ### メジャーバージョン | ### メジャーバージョン | ||
| 行 28: | 行 26: | ||
| </ | </ | ||
| - | OSの識別 | + | ===== OSの識別 |
| - | -------- | + | |
| Windowsの各バージョンの値は次のようになっている。 | Windowsの各バージョンの値は次のようになっている。 | ||
| - | ^ OS種類 | + | ^ OS種類 |
| - | | | + | | Windows 95 |
| - | | | + | | Windows 98 |
| - | | | + | | Windows Me | 4 | 90 |
| - | | | + | | Windows NT 4.0 | 4 | 0 | `WIN32_NT`プラットフォーム |
| + | | Windows 2000 | 5 | 0 | | | ||
| + | | Windows XP | 5 | 1 | | | ||
| + | | Windows 2003 | 5 | 2 | | | ||
| + | | Windows Vista | 6 | 0 | | | ||
| + | | Windows 7 | 6 | ||
| + | | Windows 8 | 6 | ||
| + | | Windows 8.1 | ||
| + | | Windows 10 | 10 | 0 | | | ||
| - | 参考 | + | ===== 参考 |
| - | ---- | + | |
| - | 1. [[https:// | + | - [[https:// |
programing/cpp_builder/cpp_builder-get-windows-version.1580952723.txt.gz · 最終更新: by yoko
