Back to Notepad3

Windows 10 Minimum Version Upgrade – Actionable Checklist

todo/W10-todo.md

latest7.3 KB
Original Source

Windows 10 Minimum Version Upgrade – Actionable Checklist

Goal: Raise the minimum supported OS from Windows 7 (0x0601) to Windows 10 (0x0A00). Verified: VS2026 (v145) and VS2022 (v143) both build clean before changes.

Strategy: Implement each section → build with VS2026 → commit & push → move on.


1. Version Defines – vcxproj Files ✅ (PR #5565)

All preprocessor definitions in every <PreprocessorDefinitions> block must change:

OldNew
_WIN32_WINNT=0x601_WIN32_WINNT=0x0A00
WINVER=0x601WINVER=0x0A00
NTDDI_VERSION=0x06010000NTDDI_VERSION=0x0A000000

Notepad3 Core

  • src/Notepad3.vcxproj – 9 config blocks (PR #5565)

Scintilla

  • scintilla/Scintilla.vcxproj – 12 config blocks (PR #5565)
  • scintilla/ScintillaDLL.vcxproj – 4 config blocks (PR #5565)

Lexilla

  • lexilla/Lexilla.vcxproj – 9 config blocks (PR #5565)

Other

  • other_sln/Notepad3DLL.vcxproj – 4 config blocks (PR #5565)

🔨 GATE: Build with VS2026 → commit → push ✅ Done via PR #5565


2. Version Defines – Source File Headers ✅ (PR #5565)

PR #5565 updated all headers using _WIN32_WINNT_WIN10 / NTDDI_WIN10_RS5 symbolic constants + #include <sdkddkver.h>.

Primary headers

  • src/TypeDefs.h – updated defines (PR #5565)
  • src/TypeDefs.h#if 0 block handled (PR #5565)
  • src/resource.h – updated defines (PR #5565)

Individual source files

  • src/EncodingDetection.cpp (PR #5565)
  • src/Print.cpp (PR #5565)
  • src/PathLib.c (PR #5565)
  • src/Config/Config.cpp (PR #5565)
  • src/crypto/crypto.c (PR #5565)
  • src/crypto/rijndael-api-fst.c (PR #5565)
  • src/ChooseFont/ChooseFont.h (PR #5565)

Backlog / Test files

  • src/_backlog/AccelKeys.c (PR #5565)
  • test/test_files/StyleLexers/styleLexCPP/Config.cpp – syntax highlighting test data, not compiled code (left as-is intentionally)

🔨 GATE: Build with VS2026 → commit → push ✅ Done via PR #5565


3. Application Manifests – Clean Up Legacy OS GUIDs ✅

Files to update:

  • res/Notepad3.exe.manifest – cleaned (PR #5565)
  • minipath/res/MiniPath.exe.manifest – cleaned (PR #5565)
  • grepWinNP3/src/compatibility.manifest – cleaned (commit 88827d8db)

🔨 GATE: Build with VS2026 → commit → push88827d8db


4. Runtime Version Checks – Dead Code Removal ✅

src/Notepad3.c

  • Line 688 – IsWindowsXPSP3OrGreater() ? 1 : 2 → simplified to 1 (commit 88827d8db)
  • Lines 1010–1014 – IsWindows7SP1OrGreater() guard → updated (PR #5565)
  • Lines 2829–2839 – if (!IsWindowsVistaOrGreater()) block removed (PR #5565)
  • Line 3311 – !IsWindowsXPSP3OrGreater() && removed from condition (commit 88827d8db)
  • Line 3314 – if (bProcessed && !IsWindowsXPSP3OrGreater()) block removed (commit 88827d8db)
  • Line 12112 – !IsWindowsVistaOrGreater() || removed (PR #5565)

src/Helpers.c

  • Lines 355–361 – IsProcessElevated(): IsWindowsVistaOrGreater() check removed (PR #5565)
  • Lines 225–251 – GetWinVersionString(): Win7/Win8/Win8.1 branches removed (PR #5565)

🔨 GATE: Build with VS2026 → commit → push88827d8db


5. Compile-Time Conditionals – Simplified by NTDDI_WIN10 ✅

src/Helpers.c – URL Escape Functions

  • Lines 1986–1999 – Removed #if (NTDDI_VERSION < NTDDI_WIN8) legacy URL char tables (commit 88827d8db)
  • Lines 2003–2049 – UrlEscapeEx(): Removed #else branch, kept Win8+ path (commit 88827d8db)
  • Lines 2057–2100 – UrlUnescapeEx(): Removed #else branch, kept Win8+ path (commit 88827d8db)

src/DarkMode/DarkMode.cpp

  • Lines 58–69 – #if _WIN32_WINNT < _WIN32_WINNT_WIN8 block removed (PR #5565)
  • Line 64 – GetProcAddress for SetDefaultDllDirectories removed (PR #5565)

🔨 GATE: Build with VS2026 → commit → push88827d8db


6. API Modernizations – Win10 Guaranteed APIs ✅

GetTickCount()GetTickCount64() (avoids 49.7-day rollover)

  • src/Notepad3.c line 179 – s_dwAutoScrollStartTick type: DWORDULONGLONG (commit 4d9a45805)
  • src/Notepad3.c line 2482 – GetTickCount()GetTickCount64() (commit 4d9a45805)
  • src/Notepad3.c line 2491 – GetTickCount()GetTickCount64() (commit 4d9a45805)
  • src/Helpers.c line 615 – GetTickCount()GetTickCount64() (commit 4d9a45805)
  • src/Helpers.c line 617 – GetTickCount()GetTickCount64() with (DWORD) cast (commit 4d9a45805)

Future Evaluation (not blockers)

  • RtlAreLongPathsEnabled – evaluate direct ntdll linkage vs dynamic loading
  • PathCch* APIs – evaluate uncommenting #include <pathcch.h>
  • GetSystemMetrics()GetSystemMetricsForDpi() – evaluate DPI-aware variants

🔨 GATE: Build with VS2026 → commit → push4d9a45805


7. Commented-Out / Disabled Legacy Code Cleanup ✅

  • src/Helpers.c lines 184–222 – _GetTrueWindowsVersion() #if 0 block removed (commit c9c3dbf5e)
  • src/Notepad3.c lines 1251–1253 – Commented-out ChangeWindowMessageFilter calls removed (commit c9c3dbf5e)
  • src/Notepad3.c lines 1016–1017 – SetProcessDpiAwarenessContext comment replaced with manifest note (commit c9c3dbf5e)
  • src/Notepad3.c line 1091 – SetThreadDpiAwarenessContext commented code removed (commit c9c3dbf5e)
  • src/PathLib.c line 67 – Already handled by PR #5565

🔨 GATE: Build with VS2026 → commit → pushc9c3dbf5e


8. Build Infrastructure ✅

Build.ps1 – VS2026 Support

  • Build/scripts/Build.ps1 line 26 – vswhere range [17.0,18.0)[17.0,19.0) (commit c9c3dbf5e)

build.yml – Version Bump

  • .github/workflows/build.yml line 43 – $Major = 6$Major = 7 (commit bdbc15faa)

🔨 GATE: Build with VS2026 → commit → pushc9c3dbf5e


9. Verification ✅

  • Build x64 Release with VS2026 – PASS (exit code 0, v18.3.2)
  • Grep for remaining 0x0601 or 0x06010000clean (no matches in source)
  • Grep for remaining _WIN32_WINNT_WIN7 or NTDDI_WIN7clean (only in SDK header dlgs.h)
  • Grep for IsWindowsVistaOrGreater|IsWindows7|IsWindowsXPSP3clean (no matches)
  • Build x64 Release with VS2022 (manual verification)
  • Build Win32 Release (manual verification)
  • Smoke-test launch on Windows 10
  • Smoke-test launch on Windows 11
  • Verify Dark Mode still works (Win10 1809+)
  • Verify URL copy/escape in hyperlink features
  • Verify toolbar appearance (XP ternary removed)
  • Verify elevated relaunch still works

10. Documentation ✅

  • Created WinUpgrade.md in repo root (commit f2bc77890)
  • Update any README/docs referencing "Windows 7" as minimum OS requirement