diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index ed49e20..4c40cf6 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -24,4 +24,4 @@ jobs: with: clang-format-version: '17' exclude-regex: 'include/*' - fallback-style: 'Microsoft' \ No newline at end of file + fallback-style: 'Microsoft' diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c08e6ee..f7da21d 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -15,7 +15,8 @@ permissions: jobs: analyze: name: Analyze (${{ matrix.language }}) - runs-on: windows-latest + # Use VS 2026 preview runner (GA May 4, 2026, then switch to windows-2025) + runs-on: windows-2025-vs2026 permissions: packages: read actions: read @@ -39,9 +40,32 @@ jobs: with: submodules: 'recursive' + - name: Install Windows 11 SDK (10.0.22621.0) + shell: pwsh + run: | + $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 already installed" + exit 0 + } + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + $installer = "$env:TEMP\winsdksetup.exe" + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + Write-Host "Installer exit code: $($proc.ExitCode)" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + } else { + Write-Host "SDK install log:" + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed - path not found: $sdkPath" + exit 1 + } + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/init@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: languages: ${{ matrix.language }} build-mode: ${{ matrix.build-mode }} @@ -53,11 +77,11 @@ jobs: # queries: security-extended,security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/autobuild@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 - name: Perform CodeQL Analysis id: analyze - uses: github/codeql-action/analyze@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/analyze@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml index 798fe2e..b650e33 100644 --- a/.github/workflows/devskim.yml +++ b/.github/workflows/devskim.yml @@ -29,11 +29,11 @@ jobs: uses: microsoft/DevSkim-Action@4b5047945a44163b94642a1cecc0d93a3f428cc6 # v1.0.16 - name: Upload DevSkim scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/upload-sarif@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: sarif_file: devskim-results.sarif - name: Upload DevSkim scan results as an artifact uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 with: - path: devskim-results.sarif \ No newline at end of file + path: devskim-results.sarif diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 425a67b..eceb64e 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -13,7 +13,8 @@ permissions: jobs: build: - runs-on: windows-latest + # Use VS 2026 preview runner (GA May 4, 2026, then switch to windows-2025) + runs-on: windows-2025-vs2026 permissions: security-events: write strategy: @@ -32,6 +33,29 @@ jobs: with: submodules: 'recursive' + - name: Install Windows 11 SDK (10.0.22621.0) + shell: pwsh + run: | + $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\10.0.22621.0" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 already installed" + exit 0 + } + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + $installer = "$env:TEMP\winsdksetup.exe" + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + Write-Host "Installer exit code: $($proc.ExitCode)" + if (Test-Path $sdkPath) { + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + } else { + Write-Host "SDK install log:" + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed - path not found: $sdkPath" + exit 1 + } + - name: "Build" shell: pwsh run: | @@ -63,4 +87,4 @@ jobs: - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0 with: - files: "artifacts/**/*.trx" \ No newline at end of file + files: "artifacts/**/*.trx" diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml index 5d28141..454041f 100644 --- a/.github/workflows/scorecards.yml +++ b/.github/workflows/scorecards.yml @@ -71,6 +71,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: "Upload to code-scanning" - uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5 + uses: github/codeql-action/upload-sarif@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: sarif_file: results.sarif diff --git a/.vsconfig b/.vsconfig index 77f62a5..da07a9d 100644 --- a/.vsconfig +++ b/.vsconfig @@ -29,7 +29,7 @@ "Microsoft.VisualStudio.Component.VC.Tools.ARM64", "Microsoft.VisualStudio.Component.VC.Tools.ARM64EC", "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", - "Microsoft.VisualStudio.Component.Windows10SDK.18362", + "Microsoft.VisualStudio.Component.Windows11SDK.22621", "Microsoft.VisualStudio.ComponentGroup.ArchitectureTools.Native", "Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core", "Microsoft.VisualStudio.Workload.CoreEditor", diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..77d0167 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,37 @@ + + + + + v145 + + + 10.0.22621.0 + + + + Spectre + false + Guard + true + + + + + + + + + Level4 + true + true + stdcpplatest + + + + + + + false + + + diff --git a/mapistub.sln b/mapistub.sln index 0551dde..13a02ef 100644 --- a/mapistub.sln +++ b/mapistub.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.779 +# Visual Studio Version 18 +VisualStudioVersion = 18.0.0.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mapistub", "mapistub.vcxproj", "{ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}" EndProject diff --git a/mapistub.vcxproj b/mapistub.vcxproj index 1a0a120..9bbe91b 100644 --- a/mapistub.vcxproj +++ b/mapistub.vcxproj @@ -20,14 +20,6 @@ Debug x64 - - Fuzz - ARM64 - - - Fuzz - ARM64EC - Fuzz Win32 @@ -120,239 +112,166 @@ {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C} mapistub - 10.0 StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true StaticLibrary Unicode - v143 false - Spectre true - true + true true StaticLibrary MultiByte - v143 false - Spectre true StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true StaticLibrary Unicode - v143 false - Spectre true - true + true true StaticLibrary MultiByte - v143 false - Spectre true StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true - - StaticLibrary - Unicode - v143 - false - Spectre - true - true - true - StaticLibrary MultiByte - v143 false - Spectre true StaticLibrary Unicode - v143 true - Spectre false StaticLibrary MultiByte - v143 true - Spectre false StaticLibrary MultiByte - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre false StaticLibrary Unicode - v143 false - Spectre true - - StaticLibrary - Unicode - v143 - false - Spectre - true - true - true - StaticLibrary MultiByte - v143 false - Spectre true @@ -417,9 +336,6 @@ - - - @@ -438,9 +354,6 @@ - - - @@ -462,11 +375,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -479,11 +390,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -499,11 +408,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -515,11 +422,9 @@ true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset @@ -533,15 +438,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -564,15 +465,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -594,15 +491,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -625,15 +518,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -656,15 +545,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -686,15 +571,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -716,15 +597,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -745,15 +622,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -774,15 +647,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -803,15 +672,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -831,15 +696,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -859,15 +720,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -887,15 +744,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -916,15 +769,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -944,15 +793,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -975,15 +820,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1005,46 +846,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest - Guard - - - _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) - - - /safeseh %(AdditionalOptions) - true - Windows - true - true - true - - - - - MaxSpeed - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) - true - MultiThreaded - true - Level4 - true - ProgramDatabase - true - true - true - Default - true - stdcpplatest Guard @@ -1067,45 +873,11 @@ true MultiThreaded true - Level4 - true - ProgramDatabase - true - true - true - Default - true - stdcpplatest - Guard - - - _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) - - - true - Windows - true - true - true - - - - - MaxSpeed - $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) - true - MultiThreaded - true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest Guard @@ -1127,15 +899,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -1156,15 +924,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1185,15 +949,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1214,15 +974,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -1242,15 +998,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1270,15 +1022,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true true - true false false - stdcpplatest Guard @@ -1298,15 +1046,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard @@ -1327,15 +1071,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest Guard