diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index bf43dddeb..9096e5a67 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -19,9 +19,22 @@ jobs: egress-policy: audit - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - name: Run clang-format style check for C/C++ programs. - uses: jidicula/clang-format-action@6cd220de46c89139a0365edae93eee8eb30ca8fe # v4.16.0 - with: - clang-format-version: '17' - exclude-regex: 'mapistub/*' - fallback-style: 'Microsoft' \ No newline at end of file + + - name: Install clang-format + run: | + sudo apt-get update + sudo apt-get install -y clang-format-17 + + - name: Run clang-format style check + run: | + # Find all C/C++ files, excluding mapistub directory + files=$(find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) \ + ! -path "./mapistub/*" ! -path "./.git/*" | sort) + + if [ -z "$files" ]; then + echo "No C/C++ files found" + exit 0 + fi + + # Check formatting (--dry-run -Werror exits non-zero if changes needed) + echo "$files" | xargs clang-format-17 --verbose --dry-run -Werror --style=file --fallback-style=Microsoft diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 2e9e9de99..a99165dd6 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 @@ -27,7 +28,7 @@ jobs: matrix: include: - language: c-cpp - build-mode: autobuild + build-mode: manual steps: - name: Harden Runner uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 @@ -39,6 +40,39 @@ 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 + } + + # Download and verify installer + $installer = "$env:TEMP\winsdksetup.exe" + $expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + + # Verify SHA256 hash + $actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash + if ($actualHash -ne $expectedHash) { + Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash" + exit 1 + } + Write-Host "SHA256 verified: $actualHash" + + # Install SDK + 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 + if (!(Test-Path $sdkPath)) { + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed" + exit 1 + } + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@89a39a4e59826350b863aa6b6252a07ad50cf83e # v3.29.5 @@ -52,8 +86,12 @@ jobs: # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - - name: Autobuild - uses: github/codeql-action/autobuild@89a39a4e59826350b863aa6b6252a07ad50cf83e # v3.29.5 + - name: Build for CodeQL + shell: pwsh + run: | + $path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + # Build Release_Unicode|x64 for CodeQL analysis + & $path\MSBuild\Current\Bin\amd64\msbuild.exe /m /p:Configuration=Release_Unicode /p:Platform=x64 mfcmapi.sln - name: Perform CodeQL Analysis id: analyze diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml index 3a98ac4c0..79e98eeb4 100644 --- a/.github/workflows/devskim.yml +++ b/.github/workflows/devskim.yml @@ -31,4 +31,4 @@ jobs: - name: Upload DevSkim scan results to GitHub Security tab 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 835a06e84..b92011578 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -13,13 +13,25 @@ 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: + fail-fast: false matrix: configuration: [ 'Release', 'Debug', 'Release_Unicode', 'Debug_Unicode' ] - platform: [ 'Win32', 'x64' ] + platform: [ 'Win32', 'x64', 'ARM64', 'ARM64EC' ] + exclude: + # ARM64/ARM64EC only need Unicode builds + - platform: ARM64 + configuration: Release + - platform: ARM64 + configuration: Debug + - platform: ARM64EC + configuration: Release + - platform: ARM64EC + configuration: Debug steps: - name: Harden Runner @@ -32,6 +44,39 @@ 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 + } + + # Download and verify installer + $installer = "$env:TEMP\winsdksetup.exe" + $expectedHash = "73FE3CC0E50D946D0C0A83A1424111E60DEE23F0803E305A8974A963B58290C0" + Write-Host "Downloading Windows 11 SDK 10.0.22621.0..." + Invoke-WebRequest -Uri "https://go.microsoft.com/fwlink/?linkid=2196241" -OutFile $installer + + # Verify SHA256 hash + $actualHash = (Get-FileHash -Path $installer -Algorithm SHA256).Hash + if ($actualHash -ne $expectedHash) { + Write-Error "SHA256 hash mismatch! Expected: $expectedHash, Got: $actualHash" + exit 1 + } + Write-Host "SHA256 verified: $actualHash" + + # Install SDK + Write-Host "Installing SDK (this may take a few minutes)..." + $proc = Start-Process -FilePath $installer -ArgumentList "/features OptionId.DesktopCPPx64 OptionId.DesktopCPPx86 OptionId.DesktopCPParm64 /quiet /norestart /log $env:TEMP\sdk_install.log" -Wait -PassThru + if (!(Test-Path $sdkPath)) { + Get-Content "$env:TEMP\sdk_install.log" -ErrorAction SilentlyContinue | Select-Object -Last 50 + Write-Error "Windows SDK installation failed" + exit 1 + } + Write-Host "Windows SDK 10.0.22621.0 installed successfully" + - name: "Build" shell: pwsh run: | @@ -39,6 +84,7 @@ jobs: & $path\MSBuild\Current\Bin\amd64\msbuild.exe /m /p:Configuration="${{matrix.configuration}}" /p:Platform="${{matrix.platform}}" mfcmapi.sln - name: Find vstest.console.exe + if: matrix.platform != 'ARM64' && matrix.platform != 'ARM64EC' run: | $VSDevTestCmd = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere" -latest -prerelease -products * -find Common7\IDE\Extensions\TestPlatform\vstest.console.exe if (!$VSDevTestCmd) { exit 1 } @@ -46,6 +92,7 @@ jobs: Add-Content $env:GITHUB_ENV "VSDevTestCmd=$VSDevTestCmd" - name: MFCMAPI UnitTests + if: matrix.platform != 'ARM64' && matrix.platform != 'ARM64EC' run: cmd /c "$env:VSDevTestCmd" /Parallel /EnableCodeCoverage /Logger:trx "${{github.workspace}}\\bin\\${{matrix.platform}}\\UnitTest\\${{matrix.configuration}}\\UnitTest.dll" # - name: Upload Event File @@ -56,11 +103,29 @@ jobs: - name: Upload Test Result Files uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 - if: always() + if: always() && matrix.platform != 'ARM64' && matrix.platform != 'ARM64EC' with: name: Test Results (${{ matrix.platform }} - ${{ matrix.configuration }}) path: ${{github.workspace}}/**/TestResults/**/* + - name: Upload ARM64 Binaries + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: matrix.platform == 'ARM64' && matrix.configuration == 'Release_Unicode' + with: + name: ARM64 Release Binaries + path: | + ${{github.workspace}}/bin/ARM64/MFCMapi/Release_Unicode/*.exe + ${{github.workspace}}/bin/ARM64/MrMAPI/Release_Unicode/*.exe + + - name: Upload ARM64EC Binaries + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + if: matrix.platform == 'ARM64EC' && matrix.configuration == 'Release_Unicode' + with: + name: ARM64EC Release Binaries + path: | + ${{github.workspace}}/bin/ARM64EC/MFCMapi/Release_Unicode/*.exe + ${{github.workspace}}/bin/ARM64EC/MrMAPI/Release_Unicode/*.exe + publish-test-results: name: "Publish Tests Results" needs: build @@ -86,4 +151,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 7c5f0c23b..a98a6419c 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@89a39a4e59826350b863aa6b6252a07ad50cf83e # v3.29.5 + uses: github/codeql-action/upload-sarif@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2 with: sarif_file: results.sarif diff --git a/.gitignore b/.gitignore index 40367671c..965f29a14 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ /node_modules /packages /fuzz/corpus/ -/fuzz/artifacts/ \ No newline at end of file +/fuzz/artifacts/ +/UnitTest/gen/ \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..2eccc93d6 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "ms-vscode.cpptools", + "ms-vscode.cpptools-extension-pack", + "ms-vscode.powershell" + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json index 5c0ac137e..715b1bc6f 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -2,164 +2,204 @@ "version": "0.2.0", "configurations": [ { - "name": "Debug x64", + "name": "MFCMAPI (Debug x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug x64", - "program": "${workspaceFolder}/bin/x64/Debug/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build", + "program": "${workspaceFolder}/bin/x64/Debug_Unicode/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "Release x64", + "name": "MFCMAPI (Debug x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release x64", - "program": "${workspaceFolder}/bin/x64/Release/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Debug x86", + "program": "${workspaceFolder}/bin/Win32/Debug_Unicode/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "Debug x86", + "name": "MFCMAPI (Release x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug x86", - "program": "${workspaceFolder}/bin/Win32/Debug/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release x64", + "program": "${workspaceFolder}/bin/x64/Release_Unicode/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "Release x86", + "name": "MFCMAPI (Release x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release x86", - "program": "${workspaceFolder}/bin/Win32/Release/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release x86", + "program": "${workspaceFolder}/bin/Win32/Release_Unicode/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "Debug_Unicode x64", + "name": "MFCMAPI (Debug ANSI x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug_Unicode x64", - "program": "${workspaceFolder}/bin/x64/Debug_Unicode/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Debug ANSI x64", + "program": "${workspaceFolder}/bin/x64/Debug/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "Release_Unicode x64", + "name": "MFCMAPI (Debug ANSI x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release_Unicode x64", - "program": "${workspaceFolder}/bin/x64/Release_Unicode/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Debug ANSI x86", + "program": "${workspaceFolder}/bin/Win32/Debug/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "Debug x86", + "name": "MFCMAPI (Release ANSI x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug_Unicode x86", - "program": "${workspaceFolder}/bin/Win32/Debug_Unicode/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release ANSI x64", + "program": "${workspaceFolder}/bin/x64/Release/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "Release_Unicode x86", + "name": "MFCMAPI (Release ANSI x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release_Unicode x86", - "program": "${workspaceFolder}/bin/Win32/Release_Unicode/MFCMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release ANSI x86", + "program": "${workspaceFolder}/bin/Win32/Release/MFCMapi.exe", + "stopAtEntry": false, "cwd": "${workspaceFolder}", "console": "internalConsole" }, { - "name": "MrMAPI Debug x64", + "name": "MrMAPI (Debug x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug x64", - "program": "${workspaceFolder}/bin/x64/MrMAPI/Debug/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build", + "program": "${workspaceFolder}/bin/x64/MrMAPI/Debug_Unicode/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" }, { - "name": "MrMAPI Release x64", + "name": "MrMAPI (Debug x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release x64", - "program": "${workspaceFolder}/bin/x64/MrMAPI/Release/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Debug x86", + "program": "${workspaceFolder}/bin/Win32/MrMAPI/Debug_Unicode/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" }, { - "name": "MrMAPI Debug x86", + "name": "MrMAPI (Release x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug x86", - "program": "${workspaceFolder}/bin/Win32/MrMAPI/Debug/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release x64", + "program": "${workspaceFolder}/bin/x64/MrMAPI/Release_Unicode/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" }, { - "name": "MrMAPI Release x86", + "name": "MrMAPI (Release x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release x86", - "program": "${workspaceFolder}/bin/Win32/MrMAPI/Release/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release x86", + "program": "${workspaceFolder}/bin/Win32/MrMAPI/Release_Unicode/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" }, { - "name": "MrMAPI Debug_Unicode x64", + "name": "MrMAPI (Debug ANSI x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug_Unicode x64", - "program": "${workspaceFolder}/bin/x64/MrMAPI/Debug_Unicode/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Debug ANSI x64", + "program": "${workspaceFolder}/bin/x64/MrMAPI/Debug/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" }, { - "name": "MrMAPI Release_Unicode x64", + "name": "MrMAPI (Debug ANSI x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release_Unicode x64", - "program": "${workspaceFolder}/bin/x64/MrMAPI/Release_Unicode/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Debug ANSI x86", + "program": "${workspaceFolder}/bin/Win32/MrMAPI/Debug/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" }, { - "name": "MrMAPI Debug x86", + "name": "MrMAPI (Release ANSI x64)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Debug_Unicode x86", - "program": "${workspaceFolder}/bin/Win32/MrMAPI/Debug_Unicode/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release ANSI x64", + "program": "${workspaceFolder}/bin/x64/MrMAPI/Release/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" }, { - "name": "MrMAPI Release_Unicode x86", + "name": "MrMAPI (Release ANSI x86)", "type": "cppvsdbg", "request": "launch", - "preLaunchTask": "Release_Unicode x86", - "program": "${workspaceFolder}/bin/Win32/MrMAPI/Release_Unicode/MrMAPI.exe", - "stopAtEntry": true, + "preLaunchTask": "Build Release ANSI x86", + "program": "${workspaceFolder}/bin/Win32/MrMAPI/Release/MrMAPI.exe", + "args": [], + "stopAtEntry": false, "cwd": "${workspaceFolder}", - "console": "internalConsole" + "console": "integratedTerminal" + }, + { + "name": "Fuzz (x64)", + "type": "cppvsdbg", + "request": "launch", + "preLaunchTask": "Build Fuzz x64", + "program": "${workspaceFolder}/bin/x64/Fuzz/MFCMapi.exe", + "args": [ + "${workspaceFolder}/fuzz/corpus", + "-artifact_prefix=${workspaceFolder}/fuzz/artifacts/", + "-max_total_time=60", + "-print_final_stats=1" + ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "console": "integratedTerminal" + }, + { + "name": "Fuzz (x86)", + "type": "cppvsdbg", + "request": "launch", + "preLaunchTask": "Build Fuzz x86", + "program": "${workspaceFolder}/bin/Win32/Fuzz/MFCMapi.exe", + "args": [ + "${workspaceFolder}/fuzz/corpus", + "-artifact_prefix=${workspaceFolder}/fuzz/artifacts/", + "-max_total_time=60", + "-print_final_stats=1" + ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "console": "integratedTerminal" } ] -} \ No newline at end of file +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 6862f70d1..2e306f541 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -2,241 +2,130 @@ "version": "2.0.0", "tasks": [ { - "label": "Batch Build", - "dependsOn": [ - "Debug x64", - "Debug x86", - "Debug_Unicode x64", - "Debug_Unicode x86", - "Release x64", - "Release x86", - "Release_Unicode x64", - "Release_Unicode x86" - ], - "dependsOrder": "parallel", - "group": "build", - "isBackground": true - }, - { - "label": "Debug x64", - "type": "shell", - "command": "msbuild /property:Configuration=Debug /property:Platform=x64", - "group": { "kind": "build", "isDefault": true } - }, - { - "label": "Release x64", - "type": "shell", - "command": "msbuild /property:Configuration=Release /property:Platform=x64", - "group": "build" - }, - { - "label": "Debug x86", - "type": "shell", - "command": "msbuild /property:Configuration=Debug /property:Platform=Win32", - "group": { "kind": "build", "isDefault": true } - }, - { - "label": "Release x86", - "type": "shell", - "command": "msbuild /property:Configuration=Release /property:Platform=Win32", - "group": "build" - }, - { - "label": "Debug_Unicode x64", - "type": "shell", - "command": "msbuild /property:Configuration=Debug_Unicode /property:Platform=x64", - "group": "build" - }, - { - "label": "Release_Unicode x64", - "type": "shell", - "command": "msbuild /property:Configuration=Release_Unicode /property:Platform=x64", - "group": "build" - }, - { - "label": "Debug_Unicode x86", - "type": "shell", - "command": "msbuild /property:Configuration=Debug_Unicode /property:Platform=Win32", - "group": { "kind": "build", "isDefault": true } - }, - { - "label": "Release_Unicode x86", - "type": "shell", - "command": "msbuild /property:Configuration=Release_Unicode /property:Platform=Win32", - "group": "build" + "label": "Build", + "type": "npm", + "script": "build", + "group": { "kind": "build", "isDefault": true }, + "problemMatcher": "$msCompile" }, { - "label": "Batch Prefast Build", - "dependsOn": [ - "Prefast x64", - "Prefast x86", - ], - "dependsOrder": "parallel", + "label": "Build Debug x64", + "type": "npm", + "script": "build:debug:x64", "group": "build", - "isBackground": true - }, - { - "label": "Prefast x64", - "type": "shell", - "command": "msbuild /property:Configuration=Prefast /property:Platform=x64", - "group": { "kind": "build", "isDefault": true }, "problemMatcher": "$msCompile" }, { - "label": "Prefast x86", - "type": "shell", - "command": "msbuild /property:Configuration=Prefast /property:Platform=Win32", - "group": "build" + "label": "Build Debug x86", + "type": "npm", + "script": "build:debug:x86", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Batch Clean", - "dependsOn": [ - "Clean Debug x64", - "Clean Debug x86", - "Clean Debug_Unicode x64", - "Clean Debug_Unicode x86", - "Clean Release x64", - "Clean Release x86", - "Clean Release_Unicode x64", - "Clean Release_Unicode x86", - "Clean Prefast x64", - "Clean Prefast x86" - ], - "dependsOrder": "parallel", + "label": "Build Release x64", + "type": "npm", + "script": "build:release:x64", "group": "build", - "isBackground": true + "problemMatcher": "$msCompile" }, { - "label": "Clean Debug x64", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Debug /property:Platform=x64", - "group": "build" + "label": "Build Release x86", + "type": "npm", + "script": "build:release:x86", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Release x64", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Release /property:Platform=x64", - "group": "build" + "label": "Build Debug ANSI x64", + "type": "npm", + "script": "build:debug:ansi:x64", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Debug x86", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Debug /property:Platform=Win32", - "group": "build" + "label": "Build Debug ANSI x86", + "type": "npm", + "script": "build:debug:ansi:x86", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Release x86", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Release /property:Platform=Win32", - "group": "build" + "label": "Build Release ANSI x64", + "type": "npm", + "script": "build:release:ansi:x64", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Debug_Unicode x64", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Debug_Unicode /property:Platform=x64", - "group": "build" + "label": "Build Release ANSI x86", + "type": "npm", + "script": "build:release:ansi:x86", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Release_Unicode x64", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Release_Unicode /property:Platform=x64", - "group": "build" + "label": "Build Prefast x64", + "type": "npm", + "script": "build:prefast:x64", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Debug_Unicode x86", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Debug_Unicode /property:Platform=Win32", - "group": "build" + "label": "Build Prefast x86", + "type": "npm", + "script": "build:prefast:x86", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Release_Unicode x86", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Release_Unicode /property:Platform=Win32", - "group": "build" + "label": "Build Fuzz x64", + "type": "npm", + "script": "build:fuzz:x64", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Prefast x64", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Prefast /property:Platform=x64", - "group": "build" + "label": "Build Fuzz x86", + "type": "npm", + "script": "build:fuzz:x86", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Clean Prefast x86", - "type": "shell", - "command": "msbuild /target:Clean /property:Configuration=Prefast /property:Platform=Win32", - "group": "build" + "label": "Build All", + "type": "npm", + "script": "build:all", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Batch unit test", - "dependsOn": [ - "Unit test Debug x64", - "Unit test Release x64", - "Unit test Debug x86", - "Unit test Release x86", - "Unit test Debug_Unicode x64", - "Unit test Release_Unicode x64", - "Unit test Debug_Unicode x86", - "Unit test Release_Unicode x86" - ], - "dependsOrder": "parallel", - "group": "test", - "isBackground": true + "label": "Clean", + "type": "npm", + "script": "clean", + "group": "build", + "problemMatcher": "$msCompile" }, { - "label": "Unit test Debug x64", - "dependsOn": [ "Debug x64" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/x64/UnitTest/Debug/UnitTest.dll /logger:console /logger:trx", + "label": "Test", + "type": "npm", + "script": "test", "group": { "kind": "test", "isDefault": true }, + "problemMatcher": "$msCompile" }, { - "label": "Unit test Release x64", - "dependsOn": [ "Release x64" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/x64/UnitTest/Release/UnitTest.dll /logger:console /logger:trx", - "group": "test" - }, - { - "label": "Unit test Debug x86", - "dependsOn": [ "Debug x86" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/Win32/UnitTest/Debug/UnitTest.dll /logger:console /logger:trx", - "group": "test" - }, - { - "label": "Unit test Release x86", - "dependsOn": [ "Release x86" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/Win32/UnitTest/Release/UnitTest.dll /logger:console /logger:trx", - "group": "test" - }, - { - "label": "Unit test Debug_Unicode x64", - "dependsOn": [ "Debug_Unicode x64" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/x64/UnitTest/Debug_Unicode/UnitTest.dll /logger:console /logger:trx", - "group": "test" - }, - { - "label": "Unit test Release_Unicode x64", - "dependsOn": [ "Release_Unicode x64" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/x64/UnitTest/Release_Unicode/UnitTest.dll /logger:console /logger:trx", - "group": "test" - }, - { - "label": "Unit test Debug_Unicode x86", - "dependsOn": [ "Debug_Unicode x86" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/Win32/UnitTest/Debug_Unicode/UnitTest.dll /logger:console /logger:trx", - "group": "test" + "label": "Test Debug x64", + "type": "npm", + "script": "test:debug:x64", + "group": "test", + "problemMatcher": "$msCompile" }, { - "label": "Unit test Release_Unicode x86", - "dependsOn": [ "Release_Unicode x86" ], - "type": "shell", - "command": "vstest.console.exe ${workspaceFolder}/bin/Win32/UnitTest/Release_Unicode/UnitTest.dll /logger:console /logger:trx", - "group": "test" - }, + "label": "Test Release x64", + "type": "npm", + "script": "test:release:x64", + "group": "test", + "problemMatcher": "$msCompile" + } ] } diff --git a/.vsconfig b/.vsconfig index 77f62a5d0..72475f544 100644 --- a/.vsconfig +++ b/.vsconfig @@ -16,8 +16,12 @@ "Microsoft.VisualStudio.Component.UWP.VC.ARM64", "Microsoft.VisualStudio.Component.UWP.VC.ARM64EC", "Microsoft.VisualStudio.Component.VC.ATL", + "Microsoft.VisualStudio.Component.VC.ATL.ARM64", + "Microsoft.VisualStudio.Component.VC.ATL.ARM64EC", "Microsoft.VisualStudio.Component.VC.ATL.Spectre", "Microsoft.VisualStudio.Component.VC.ATLMFC", + "Microsoft.VisualStudio.Component.VC.MFC.ARM64", + "Microsoft.VisualStudio.Component.VC.MFC.ARM64EC", "Microsoft.VisualStudio.Component.VC.ATLMFC.Spectre", "Microsoft.VisualStudio.Component.VC.CoreIde", "Microsoft.VisualStudio.Component.VC.DiagnosticTools", @@ -29,7 +33,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/CONTRIBUTING.md b/CONTRIBUTING.md index 1f77f662d..0558d83c9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,12 +4,66 @@ All pull requests are welcome, there are just a few guidelines you need to follo When contributing to this repository, please first discuss the change by creating a new [issue](https://github.com/microsoft/mfcmapi/issues) or by replying to an existing one. +## REQUIREMENTS + +* **Visual Studio 2026** with the following workloads: + - Desktop development with C++ + - v145 toolset (VS 2026) + - Windows 11 SDK (10.0.22621.0) + - Spectre-mitigated libraries (recommended) +* **Node.js** (for npm-based builds - optional but recommended) + +### Verify Prerequisites + +Run the prerequisite check to verify your environment: +```bash +npm run prereq +``` + +Or use the .vsconfig file to install all required components: +1. Open Visual Studio Installer +2. Click **More** → **Import configuration** +3. Select the `.vsconfig` file from the repo root + ## GETTING STARTED * Make sure you have a [GitHub account](https://github.com/signup/free). * Fork the repository, you can [learn about forking on Github](https://help.github.com/articles/fork-a-repo) -* [Clone the repro to your local machine](https://help.github.com/articles/cloning-a-repository/) like so: -```git clone --recursive https://github.com/microsoft/mfcmapi.git``` +* [Clone the repo to your local machine](https://help.github.com/articles/cloning-a-repository/) with submodules: +```bash +git clone --recursive https://github.com/microsoft/mfcmapi.git +``` +* Install npm dependencies (for command-line builds): +```bash +npm install +``` + +## BUILDING + +### From Visual Studio +Open `MFCMapi.sln` in Visual Studio 2026 and build. + +### From VS Code +Press **F5** to build and debug. The default configuration is Debug_Unicode x64. + +### From Command Line +```bash +# Build (default: Debug_Unicode x64) +npm run build + +# Build specific configurations +npm run build:release # Release_Unicode x64 +npm run build:debug:x86 # Debug_Unicode x86 +npm run build:debug:ansi:x64 # Debug (ANSI) x64 + +# Run tests +npm run test + +# Clean all build outputs +npm run clean +``` + +The npm scripts automatically find MSBuild via vswhere, so no Developer Command Prompt is needed. ## MAKING CHANGES @@ -19,6 +73,7 @@ When contributing to this repository, please first discuss the change by creatin ```git checkout -b u/username/topic main``` * *Make sure to substitute your own name and topic in this command* * * Once you have a branch, make your changes and commit them to the local branch. +* Run `npm run test` to verify your changes don't break existing tests. * All submissions require a review and pull requests are how those happen. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on pull requests. @@ -30,3 +85,7 @@ information on pull requests. ## PUSH TO YOUR FORK AND SUBMIT A PULL REQUEST At this point you're waiting on the code/changes to be reviewed. + +## FUZZING + +MFCMAPI supports fuzzing with libFuzzer. See [Fuzzing.md](docs/Fuzzing.md) for details. diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 000000000..2ea5e6da2 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,56 @@ + + + + + v145 + + + 10.0.22621.0 + + + + Spectre + false + Guard + true + + + true + CppCoreCheckRules.ruleset + + + AllRules.ruleset + true + false + + + + + + + Level4 + true + true + stdcpplatest + + + true + + + + + + + + true + /analyze:max_paths 4 %(AdditionalOptions) + + + + + + + false + + + diff --git a/MFCMapi.sln b/MFCMapi.sln index c889b3a60..f1921f7ee 100644 --- a/MFCMapi.sln +++ b/MFCMapi.sln @@ -1,7 +1,6 @@ - Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.7.34031.279 +# Visual Studio Version 18 +VisualStudioVersion = 18.0.0.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MFCMapi", "MFCMapi.vcxproj", "{466117D5-278C-46E6-BC2E-4FA7B25C0B3F}" ProjectSection(ProjectDependencies) = postProject @@ -32,26 +31,38 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exampleMapiConsoleApp", "ex EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug_Unicode|ARM64 = Debug_Unicode|ARM64 + Debug_Unicode|ARM64EC = Debug_Unicode|ARM64EC Debug_Unicode|Win32 = Debug_Unicode|Win32 Debug_Unicode|x64 = Debug_Unicode|x64 + Debug|ARM64 = Debug|ARM64 + Debug|ARM64EC = Debug|ARM64EC Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Fuzz|Win32 = Fuzz|Win32 Fuzz|x64 = Fuzz|x64 - Prefast_Unicode|Win32 = Prefast_Unicode|Win32 - Prefast_Unicode|x64 = Prefast_Unicode|x64 - Prefast|Win32 = Prefast|Win32 - Prefast|x64 = Prefast|x64 + Release_Unicode|ARM64 = Release_Unicode|ARM64 + Release_Unicode|ARM64EC = Release_Unicode|ARM64EC Release_Unicode|Win32 = Release_Unicode|Win32 Release_Unicode|x64 = Release_Unicode|x64 + Release|ARM64 = Release|ARM64 + Release|ARM64EC = Release|ARM64EC Release|Win32 = Release|Win32 Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|ARM64.ActiveCfg = Debug_Unicode|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|ARM64.Build.0 = Debug_Unicode|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|ARM64EC.ActiveCfg = Debug_Unicode|ARM64EC + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|ARM64EC.Build.0 = Debug_Unicode|ARM64EC {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|x64.ActiveCfg = Debug_Unicode|x64 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug_Unicode|x64.Build.0 = Debug_Unicode|x64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug|ARM64.Build.0 = Debug|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug|Win32.ActiveCfg = Debug|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug|Win32.Build.0 = Debug|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Debug|x64.ActiveCfg = Debug|x64 @@ -60,78 +71,102 @@ Global {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Fuzz|Win32.Build.0 = Fuzz|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Fuzz|x64.ActiveCfg = Fuzz|x64 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Fuzz|x64.Build.0 = Fuzz|x64 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast_Unicode|Win32.ActiveCfg = Prefast_Unicode|Win32 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast_Unicode|Win32.Build.0 = Prefast_Unicode|Win32 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast_Unicode|x64.ActiveCfg = Prefast_Unicode|x64 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast_Unicode|x64.Build.0 = Prefast_Unicode|x64 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast|Win32.ActiveCfg = Prefast|Win32 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast|Win32.Build.0 = Prefast|Win32 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast|x64.ActiveCfg = Prefast|x64 - {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Prefast|x64.Build.0 = Prefast|x64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|ARM64.ActiveCfg = Release_Unicode|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|ARM64.Build.0 = Release_Unicode|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|ARM64EC.ActiveCfg = Release_Unicode|ARM64EC + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|ARM64EC.Build.0 = Release_Unicode|ARM64EC {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|x64.ActiveCfg = Release_Unicode|x64 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release_Unicode|x64.Build.0 = Release_Unicode|x64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|ARM64.ActiveCfg = Release|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|ARM64.Build.0 = Release|ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|ARM64EC.ActiveCfg = Release|ARM64EC + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|ARM64EC.Build.0 = Release|ARM64EC {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|Win32.ActiveCfg = Release|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|Win32.Build.0 = Release|Win32 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|x64.ActiveCfg = Release|x64 {466117D5-278C-46E6-BC2E-4FA7B25C0B3F}.Release|x64.Build.0 = Release|x64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|ARM64.ActiveCfg = Debug_Unicode|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|ARM64.Build.0 = Debug_Unicode|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|ARM64EC.ActiveCfg = Debug_Unicode|ARM64EC + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|ARM64EC.Build.0 = Debug_Unicode|ARM64EC {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|x64.ActiveCfg = Debug_Unicode|x64 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug_Unicode|x64.Build.0 = Debug_Unicode|x64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|ARM64.Build.0 = Debug|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|Win32.ActiveCfg = Debug|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|Win32.Build.0 = Debug|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|x64.ActiveCfg = Debug|x64 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Debug|x64.Build.0 = Debug|x64 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Fuzz|Win32.ActiveCfg = Release_Unicode|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Fuzz|x64.ActiveCfg = Release_Unicode|x64 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast_Unicode|Win32.ActiveCfg = Prefast_Unicode|Win32 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast_Unicode|Win32.Build.0 = Prefast_Unicode|Win32 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast_Unicode|x64.ActiveCfg = Prefast_Unicode|x64 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast_Unicode|x64.Build.0 = Prefast_Unicode|x64 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast|Win32.ActiveCfg = Prefast|Win32 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast|Win32.Build.0 = Prefast|Win32 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast|x64.ActiveCfg = Prefast|x64 - {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Prefast|x64.Build.0 = Prefast|x64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|ARM64.ActiveCfg = Release_Unicode|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|ARM64.Build.0 = Release_Unicode|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|ARM64EC.ActiveCfg = Release_Unicode|ARM64EC + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|ARM64EC.Build.0 = Release_Unicode|ARM64EC {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|x64.ActiveCfg = Release_Unicode|x64 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release_Unicode|x64.Build.0 = Release_Unicode|x64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|ARM64.ActiveCfg = Release|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|ARM64.Build.0 = Release|ARM64 + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|ARM64EC.ActiveCfg = Release|ARM64EC + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|ARM64EC.Build.0 = Release|ARM64EC {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|Win32.ActiveCfg = Release|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|Win32.Build.0 = Release|Win32 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|x64.ActiveCfg = Release|x64 {7AFE5655-71D0-4390-A4E0-BA915DFC18C4}.Release|x64.Build.0 = Release|x64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|ARM64.ActiveCfg = Debug_Unicode|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|ARM64.Build.0 = Debug_Unicode|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|ARM64EC.ActiveCfg = Debug_Unicode|ARM64EC + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|ARM64EC.Build.0 = Debug_Unicode|ARM64EC {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|x64.ActiveCfg = Debug_Unicode|x64 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug_Unicode|x64.Build.0 = Debug_Unicode|x64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|ARM64.Build.0 = Debug|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|Win32.ActiveCfg = Debug|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|Win32.Build.0 = Debug|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|x64.ActiveCfg = Debug|x64 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Debug|x64.Build.0 = Debug|x64 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Fuzz|Win32.ActiveCfg = Release_Unicode|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Fuzz|x64.ActiveCfg = Release_Unicode|x64 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast_Unicode|Win32.ActiveCfg = Prefast_Unicode|Win32 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast_Unicode|Win32.Build.0 = Prefast_Unicode|Win32 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast_Unicode|x64.ActiveCfg = Prefast_Unicode|x64 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast_Unicode|x64.Build.0 = Prefast_Unicode|x64 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast|Win32.ActiveCfg = Prefast|Win32 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast|Win32.Build.0 = Prefast|Win32 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast|x64.ActiveCfg = Prefast|x64 - {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Prefast|x64.Build.0 = Prefast|x64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|ARM64.ActiveCfg = Release_Unicode|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|ARM64.Build.0 = Release_Unicode|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|ARM64EC.ActiveCfg = Release_Unicode|ARM64EC + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|ARM64EC.Build.0 = Release_Unicode|ARM64EC {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|x64.ActiveCfg = Release_Unicode|x64 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release_Unicode|x64.Build.0 = Release_Unicode|x64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|ARM64.ActiveCfg = Release|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|ARM64.Build.0 = Release|ARM64 + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|ARM64EC.ActiveCfg = Release|ARM64EC + {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|ARM64EC.Build.0 = Release|ARM64EC {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|Win32.ActiveCfg = Release|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|Win32.Build.0 = Release|Win32 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|x64.ActiveCfg = Release|x64 {B8B4C7F7-682E-40EF-B5AC-054187818E23}.Release|x64.Build.0 = Release|x64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|ARM64.ActiveCfg = Debug_Unicode|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|ARM64.Build.0 = Debug_Unicode|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|ARM64EC.ActiveCfg = Debug_Unicode|ARM64EC + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|ARM64EC.Build.0 = Debug_Unicode|ARM64EC {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|x64.ActiveCfg = Debug_Unicode|x64 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug_Unicode|x64.Build.0 = Debug_Unicode|x64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug|ARM64.Build.0 = Debug|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug|Win32.ActiveCfg = Debug|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug|Win32.Build.0 = Debug|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Debug|x64.ActiveCfg = Debug|x64 @@ -140,26 +175,34 @@ Global {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Fuzz|Win32.Build.0 = Fuzz|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Fuzz|x64.ActiveCfg = Fuzz|x64 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Fuzz|x64.Build.0 = Fuzz|x64 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast_Unicode|Win32.ActiveCfg = Prefast_Unicode|Win32 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast_Unicode|Win32.Build.0 = Prefast_Unicode|Win32 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast_Unicode|x64.ActiveCfg = Prefast_Unicode|x64 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast_Unicode|x64.Build.0 = Prefast_Unicode|x64 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast|Win32.ActiveCfg = Prefast|Win32 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast|Win32.Build.0 = Prefast|Win32 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast|x64.ActiveCfg = Prefast|x64 - {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Prefast|x64.Build.0 = Prefast|x64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|ARM64.ActiveCfg = Release_Unicode|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|ARM64.Build.0 = Release_Unicode|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|ARM64EC.ActiveCfg = Release_Unicode|ARM64EC + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|ARM64EC.Build.0 = Release_Unicode|ARM64EC {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|x64.ActiveCfg = Release_Unicode|x64 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release_Unicode|x64.Build.0 = Release_Unicode|x64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|ARM64.ActiveCfg = Release|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|ARM64.Build.0 = Release|ARM64 + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|ARM64EC.ActiveCfg = Release|ARM64EC + {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|ARM64EC.Build.0 = Release|ARM64EC {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|Win32.ActiveCfg = Release|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|Win32.Build.0 = Release|Win32 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|x64.ActiveCfg = Release|x64 {D2390ABA-E7B0-476D-BB38-089FEAB5357D}.Release|x64.Build.0 = Release|x64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|ARM64.ActiveCfg = Debug_Unicode|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|ARM64.Build.0 = Debug_Unicode|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|ARM64EC.ActiveCfg = Debug_Unicode|ARM64EC + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|ARM64EC.Build.0 = Debug_Unicode|ARM64EC {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|x64.ActiveCfg = Debug_Unicode|x64 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug_Unicode|x64.Build.0 = Debug_Unicode|x64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|ARM64.Build.0 = Debug|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|Win32.ActiveCfg = Debug|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|Win32.Build.0 = Debug|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Debug|x64.ActiveCfg = Debug|x64 @@ -168,44 +211,52 @@ Global {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Fuzz|Win32.Build.0 = Fuzz|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Fuzz|x64.ActiveCfg = Fuzz|x64 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Fuzz|x64.Build.0 = Fuzz|x64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast_Unicode|Win32.ActiveCfg = Prefast_Unicode|Win32 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast_Unicode|Win32.Build.0 = Prefast_Unicode|Win32 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast_Unicode|x64.ActiveCfg = Prefast_Unicode|x64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast_Unicode|x64.Build.0 = Prefast_Unicode|x64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|Win32.ActiveCfg = Prefast|Win32 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|Win32.Build.0 = Prefast|Win32 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|x64.ActiveCfg = Prefast|x64 - {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Prefast|x64.Build.0 = Prefast|x64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|ARM64.ActiveCfg = Release_Unicode|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|ARM64.Build.0 = Release_Unicode|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|ARM64EC.ActiveCfg = Release_Unicode|ARM64EC + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|ARM64EC.Build.0 = Release_Unicode|ARM64EC {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|x64.ActiveCfg = Release_Unicode|x64 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release_Unicode|x64.Build.0 = Release_Unicode|x64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|ARM64.ActiveCfg = Release|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|ARM64.Build.0 = Release|ARM64 + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|ARM64EC.ActiveCfg = Release|ARM64EC + {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|ARM64EC.Build.0 = Release|ARM64EC {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|Win32.ActiveCfg = Release|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|Win32.Build.0 = Release|Win32 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|x64.ActiveCfg = Release|x64 {ACD4DD9F-0FB8-42C8-BC1C-25A5A29CB40C}.Release|x64.Build.0 = Release|x64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|ARM64.ActiveCfg = Debug_Unicode|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|ARM64.Build.0 = Debug_Unicode|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|ARM64EC.ActiveCfg = Debug_Unicode|ARM64EC + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|ARM64EC.Build.0 = Debug_Unicode|ARM64EC {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|Win32.ActiveCfg = Debug_Unicode|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|Win32.Build.0 = Debug_Unicode|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|x64.ActiveCfg = Debug_Unicode|x64 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug_Unicode|x64.Build.0 = Debug_Unicode|x64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|ARM64.Build.0 = Debug|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|ARM64EC.Build.0 = Debug|ARM64EC {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|Win32.ActiveCfg = Debug|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|Win32.Build.0 = Debug|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|x64.ActiveCfg = Debug|x64 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Debug|x64.Build.0 = Debug|x64 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Fuzz|Win32.ActiveCfg = Release_Unicode|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Fuzz|x64.ActiveCfg = Release_Unicode|x64 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast_Unicode|Win32.ActiveCfg = Prefast_Unicode|Win32 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast_Unicode|Win32.Build.0 = Prefast_Unicode|Win32 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast_Unicode|x64.ActiveCfg = Prefast_Unicode|x64 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast_Unicode|x64.Build.0 = Prefast_Unicode|x64 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast|Win32.ActiveCfg = Prefast|Win32 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast|Win32.Build.0 = Prefast|Win32 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast|x64.ActiveCfg = Prefast|x64 - {0E30B8F5-4480-4130-BC46-BABA613B983F}.Prefast|x64.Build.0 = Prefast|x64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|ARM64.ActiveCfg = Release_Unicode|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|ARM64.Build.0 = Release_Unicode|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|ARM64EC.ActiveCfg = Release_Unicode|ARM64EC + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|ARM64EC.Build.0 = Release_Unicode|ARM64EC {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|Win32.ActiveCfg = Release_Unicode|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|Win32.Build.0 = Release_Unicode|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|x64.ActiveCfg = Release_Unicode|x64 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release_Unicode|x64.Build.0 = Release_Unicode|x64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release|ARM64.ActiveCfg = Release|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release|ARM64.Build.0 = Release|ARM64 + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release|ARM64EC.ActiveCfg = Release|ARM64EC + {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release|ARM64EC.Build.0 = Release|ARM64EC {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release|Win32.ActiveCfg = Release|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release|Win32.Build.0 = Release|Win32 {0E30B8F5-4480-4130-BC46-BABA613B983F}.Release|x64.ActiveCfg = Release|x64 diff --git a/MFCMapi.vcxproj b/MFCMapi.vcxproj index a709e6be6..8f71e8f8a 100644 --- a/MFCMapi.vcxproj +++ b/MFCMapi.vcxproj @@ -28,22 +28,6 @@ Fuzz x64 - - Prefast_Unicode - Win32 - - - Prefast_Unicode - x64 - - - Prefast - Win32 - - - Prefast - x64 - Release_Unicode Win32 @@ -60,142 +44,173 @@ Release x64 + + Debug + ARM64EC + + + Debug_Unicode + ARM64EC + + + Release + ARM64EC + + + Release_Unicode + ARM64EC + + + Debug + ARM64 + + + Debug_Unicode + ARM64 + + + Release + ARM64 + + + Release_Unicode + ARM64 + {466117D5-278C-46E6-BC2E-4FA7B25C0B3F} MFCMapi MFCProj - 10.0 Application Static Unicode - v143 true - Spectre false Application Static MultiByte - v143 true - Spectre - false - - - Application - Static - MultiByte - v143 - false - Spectre - false - - - Application - Static - Unicode - v143 - false - Spectre false Application Static Unicode - v143 false - Spectre true Application Static Unicode - v143 false - Spectre true - true + true true Application Static MultiByte - v143 false - Spectre true Application Static Unicode - v143 true - Spectre + false + + + Application + Static + Unicode + true false Application Static MultiByte - v143 true - Spectre false - + Application Static MultiByte - v143 - false - Spectre + true false - + Application Static Unicode - v143 false - Spectre - false + true - + Application Static Unicode - v143 false - Spectre true Application Static Unicode - v143 false - Spectre true - true + true true Application Static MultiByte - v143 false - Spectre + true + + + Application + Static + MultiByte + false + true + + + Application + Static + Unicode + true + false + + + Application + Static + MultiByte + true + false + + + Application + Static + Unicode + false + true + + + Application + Static + MultiByte + false true @@ -207,12 +222,6 @@ - - - - - - @@ -228,19 +237,37 @@ - + - + - + - + - + + + + + + + + + + + + + + + + + + + @@ -260,14 +287,6 @@ true - - 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 - @@ -276,21 +295,33 @@ true - + true - - true - .gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset + + true - - true - .gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset + + true + + + + + + true + + + true + + + + + $(VC_ReferencesPath_VC_x64);$(LibraryPath) @@ -303,15 +334,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -329,7 +356,7 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest @@ -344,15 +371,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -369,7 +392,79 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true + + + $(ProjectDir)\mfcmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + true + + + $(ProjectDir)\mfcmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + true $(ProjectDir)\mfcmapi.exe.manifest @@ -384,15 +479,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -410,7 +501,7 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest @@ -425,15 +516,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -451,7 +538,7 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true UseLinkTimeCodeGeneration @@ -467,15 +554,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -492,7 +575,79 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true + + + $(ProjectDir)\mfcmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + true + + + $(ProjectDir)\mfcmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + true $(ProjectDir)\mfcmapi.exe.manifest @@ -507,15 +662,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -532,7 +683,7 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true UseLinkTimeCodeGeneration @@ -548,15 +699,11 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -571,13 +718,13 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -586,36 +733,31 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -624,36 +766,31 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -662,15 +799,11 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -684,67 +817,60 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard @@ -758,13 +884,13 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -773,36 +899,31 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -811,15 +932,11 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -833,7 +950,7 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + true $(ProjectDir)\mfcmapi.exe.manifest @@ -927,6 +1044,17 @@ + + + + + + + + + + + diff --git a/MFCMapi.vcxproj.filters b/MFCMapi.vcxproj.filters index 5467ebe13..8052d5859 100644 --- a/MFCMapi.vcxproj.filters +++ b/MFCMapi.vcxproj.filters @@ -50,9 +50,47 @@ {56bd509d-6bf7-4d82-baca-407d35286b90} + + {A1B2C3D4-E5F6-4789-ABCD-EF0123456789} + - + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + + + Configuration Files + diff --git a/MrMapi/MrMAPI.vcxproj b/MrMapi/MrMAPI.vcxproj index 2808aa9e1..3afdf829b 100644 --- a/MrMapi/MrMAPI.vcxproj +++ b/MrMapi/MrMAPI.vcxproj @@ -20,22 +20,6 @@ Debug x64 - - Prefast_Unicode - Win32 - - - Prefast_Unicode - x64 - - - Prefast - Win32 - - - Prefast - x64 - Release_Unicode Win32 @@ -52,120 +36,155 @@ Release x64 + + Debug + ARM64 + + + Debug + ARM64EC + + + Debug_Unicode + ARM64 + + + Debug_Unicode + ARM64EC + + + Release + ARM64 + + + Release + ARM64EC + + + Release_Unicode + ARM64 + + + Release_Unicode + ARM64EC + {7AFE5655-71D0-4390-A4E0-BA915DFC18C4} MrMAPI Win32Proj - 10.0 Application Static Unicode - v143 true - Spectre false Application Static MultiByte - v143 true - Spectre false - + + Application + Static + Unicode + false + true + + Application Static MultiByte - v143 false - Spectre + true + + + Application + Static + Unicode + true false - + Application Static Unicode - v143 - false - Spectre + true false - + Application Static Unicode - v143 - false - Spectre - true + true + false - + Application Static MultiByte - v143 - false - Spectre - true + true + false - + Application Static - Unicode - v143 + MultiByte true - Spectre false - + Application Static MultiByte - v143 true - Spectre false - + Application Static - MultiByte - v143 + Unicode false - Spectre - false + true - + Application Static Unicode - v143 false - Spectre - false + true - + Application Static Unicode - v143 false - Spectre true Application Static MultiByte - v143 false - Spectre + true + + + Application + Static + MultiByte + false + true + + + Application + Static + MultiByte + false true @@ -177,12 +196,6 @@ - - - - - - @@ -195,12 +208,6 @@ - - - - - - @@ -224,34 +231,38 @@ true - - 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 - true + + true + + + true + true - - true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset + + true - - true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset + + true + + + + + + + + MaxSpeed @@ -261,15 +272,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -287,7 +294,6 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest @@ -302,15 +308,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -327,7 +329,76 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + + + $(ProjectDir)\mrmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;MRMAPI;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;MRMAPI;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Console + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + + + $(ProjectDir)\mrmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;MRMAPI;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;MRMAPI;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Console + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true $(ProjectDir)\mrmapi.exe.manifest @@ -342,15 +413,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -368,7 +435,6 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest @@ -383,15 +449,11 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -408,7 +470,76 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + + + $(ProjectDir)\mrmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;UNICODE;MRMAPI;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;MRMAPI;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Console + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + + + $(ProjectDir)\mrmapi.exe.manifest + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;UNICODE;MRMAPI;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;MRMAPI;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Console + true + true + true + true + $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true $(ProjectDir)\mrmapi.exe.manifest @@ -423,15 +554,11 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -446,13 +573,12 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -461,36 +587,30 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;MRMAPI;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;MRMAPI;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Console true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -499,36 +619,30 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;MRMAPI;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;MRMAPI;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Console true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -537,15 +651,11 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -559,67 +669,58 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;MRMAPI;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;UNICODE;MRMAPI;%(PreprocessorDefinitions) true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;MRMAPI;_DEBUG;_WIN64;%(PreprocessorDefinitions) + _AFXDLL;MRMAPI;_DEBUG;%(PreprocessorDefinitions) + /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Console true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;MRMAPI;%(PreprocessorDefinitions) + WIN32;_DEBUG;_CONSOLE;UNICODE;MRMAPI;%(PreprocessorDefinitions) true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard @@ -633,13 +734,12 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -648,36 +748,30 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;MRMAPI;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;MRMAPI;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) version.lib;MFCMapi.res;%(AdditionalDependencies) true Console true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -686,15 +780,11 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -708,7 +798,6 @@ true $(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true $(ProjectDir)\mrmapi.exe.manifest @@ -734,9 +823,6 @@ - - - diff --git a/MrMapi/MrMAPI.vcxproj.filters b/MrMapi/MrMAPI.vcxproj.filters index 77c2a3bb8..7b6120db1 100644 --- a/MrMapi/MrMAPI.vcxproj.filters +++ b/MrMapi/MrMAPI.vcxproj.filters @@ -118,7 +118,4 @@ Source Files\MrMAPI - - - \ No newline at end of file diff --git a/README.md b/README.md index 2f922ed06..937426ef0 100644 --- a/README.md +++ b/README.md @@ -2,35 +2,34 @@ MFCMAPI provides access to MAPI stores to facilitate investigation of Exchange and Outlook issues and to provide developers with a sample for MAPI development. -[Latest release](https://github.com/microsoft/mfcmapi/releases/latest) -[Release stats (raw JSON)](https://api.github.com/repos/microsoft/mfcmapi/releases/latest) -[Pretty release stats](https://somsubhra.github.io/github-release-stats/?username=microsoft&repository=mfcmapi&page=1&per_page=5) +## Download -## Contributing +**[Download Latest Release](https://github.com/microsoft/mfcmapi/releases/latest)** -MFCMAPI depends on the [MAPI Stub Library](https://github.com/microsoft/MAPIStubLibrary). When cloning, make sure to clone submodules. See [Contributing](CONTRIBUTING.md) for more details. +### Which version do I need? -## Fuzzing +Choose based on your **Outlook installation** (not your Windows version): -MFCMAPI supports fuzzing with [libFuzzer](https://llvm.org/docs/LibFuzzer.html) and the [fsanitize](https://learn.microsoft.com/en-us/cpp/build/reference/fsanitize?view=msvc-170) switch in Visual Studio. See [fuzz.cpp](fuzz/fuzz.cpp) for details. -To run fuzzing for this project, follow these steps: -1. **Build Fuzzing Corpus**: - - Open Powershell prompt - - Run [fuzz\Build-FuzzingCorpus.ps1](fuzz\Build-FuzzingCorpus.ps1) to generate a fuzzing corpus in [fuzz/corpus](fuzz/corpus) from Smart View unit test data. +| Your Outlook | Download | +|--------------|----------| +| **64-bit Outlook** | `MFCMAPI.exe.x64.zip` | +| **32-bit Outlook** | `MFCMAPI.exe.x86.zip` | -1. **Switch Solution Configuration**: - - Open MFCMAPI.sln in Visual Studio. - - In the toolbar, locate the **Solution Configurations** dropdown. - - Select **Fuzz** from the list of configurations. +**How to check your Outlook version:** +1. Open Outlook +2. Click **File** → **Office Account** → **About Outlook** +3. Look for "32-bit" or "64-bit" in the top line -1. **Debug Command Line Parameters**: - - When running the fuzzing tests, use the following command line parameters: -`$(ProjectDir)fuzz\corpus -artifact_prefix=fuzz\artifacts\` +> **Note:** Most Microsoft 365 installations are 64-bit. If unsure, try the x64 version first. ## Help/Feedback For assistance using MFCMAPI, developing add-ins, or general MAPI development, consult the [documentation](docs/Documentation.md). Find a bug? Need help? Have a suggestion? Report your issues through the [issues tab](https://github.com/microsoft/mfcmapi/issues). +## Contributing + +Interested in contributing? See [Contributing](CONTRIBUTING.md) for build requirements and development setup. + ## Badges [![continuous-integration](https://github.com/microsoft/mfcmapi/actions/workflows/github-ci.yml/badge.svg)](https://github.com/microsoft/mfcmapi/actions/workflows/github-ci.yml) diff --git a/UI/Controls/PaneHeader/PaneHeader.cpp b/UI/Controls/PaneHeader/PaneHeader.cpp index 1e3365d33..1c5373962 100644 --- a/UI/Controls/PaneHeader/PaneHeader.cpp +++ b/UI/Controls/PaneHeader/PaneHeader.cpp @@ -119,6 +119,7 @@ namespace controls switch (message) { case WM_PAINT: + { auto ps = PAINTSTRUCT{}; ::BeginPaint(m_hWnd, &ps); if (ps.hdc) @@ -132,6 +133,7 @@ namespace controls ::EndPaint(m_hWnd, &ps); return 0; + } case WM_WINDOWPOSCHANGED: RecalcLayout(); return 0; diff --git a/UnitTest/UnitTest.vcxproj b/UnitTest/UnitTest.vcxproj index c26fb0a22..e0db92731 100644 --- a/UnitTest/UnitTest.vcxproj +++ b/UnitTest/UnitTest.vcxproj @@ -20,22 +20,6 @@ Debug x64 - - Prefast_Unicode - Win32 - - - Prefast_Unicode - x64 - - - Prefast - Win32 - - - Prefast - x64 - Release_Unicode Win32 @@ -52,6 +36,38 @@ Release x64 + + Debug + ARM64 + + + Debug + ARM64EC + + + Debug_Unicode + ARM64 + + + Debug_Unicode + ARM64EC + + + Release + ARM64 + + + Release + ARM64EC + + + Release_Unicode + ARM64 + + + Release_Unicode + ARM64EC + {B8B4C7F7-682E-40EF-B5AC-054187818E23} @@ -59,115 +75,118 @@ Win32Proj NativeUnitTestProject UnitTest - 10.0 DynamicLibrary Static Unicode - v143 true - Spectre false DynamicLibrary Static MultiByte - v143 true - Spectre false - + + DynamicLibrary + Static + Unicode + false + true + + DynamicLibrary Static MultiByte - v143 false - Spectre + true + + + DynamicLibrary + Static + Unicode + true false - + DynamicLibrary Static Unicode - v143 - false - Spectre + true false - + DynamicLibrary Static Unicode - v143 - false - Spectre - true + true + false - + DynamicLibrary Static MultiByte - v143 - false - Spectre - true + true + false - + DynamicLibrary Static - Unicode - v143 + MultiByte true - Spectre false - + DynamicLibrary Static MultiByte - v143 true - Spectre false - + DynamicLibrary Static - MultiByte - v143 + Unicode false - Spectre - false + true - + DynamicLibrary Static Unicode - v143 false - Spectre - false + true - + DynamicLibrary Static Unicode - v143 false - Spectre true DynamicLibrary Static MultiByte - v143 false - Spectre + true + + + DynamicLibrary + Static + MultiByte + false + true + + + DynamicLibrary + Static + MultiByte + false true @@ -181,12 +200,6 @@ - - - - - - @@ -199,12 +212,6 @@ - - - - - - @@ -225,32 +232,32 @@ - - 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 - + + + + - - 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 + + + + + + + + + MaxSpeed @@ -261,16 +268,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default UnitTest\stdafx.h true - stdcpplatest false Guard @@ -287,7 +290,6 @@ $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true true - true @@ -300,16 +302,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default UnitTest\stdafx.h true - stdcpplatest false Guard @@ -324,7 +322,70 @@ true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + + + + + MaxSpeed + $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + UnitTest\stdafx.h + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + + + + + MaxSpeed + $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + UnitTest\stdafx.h + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true @@ -337,16 +398,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default UnitTest\stdafx.h true - stdcpplatest false Guard @@ -362,7 +419,6 @@ true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true @@ -375,16 +431,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default UnitTest\stdafx.h true - stdcpplatest false Guard @@ -399,7 +451,70 @@ true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true + + + + + MaxSpeed + $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + UnitTest\stdafx.h + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true + + + + + MaxSpeed + $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + UnitTest\stdafx.h + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) + true + Windows + true + true + $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) + true @@ -412,16 +527,12 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard @@ -436,10 +547,9 @@ true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true - + Disabled $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) @@ -449,34 +559,28 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true - + Disabled $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) @@ -486,34 +590,28 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true - + Disabled $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) @@ -523,16 +621,12 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard @@ -546,65 +640,56 @@ true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true - + Disabled $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + /safeseh %(AdditionalOptions) user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true - + Disabled $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard @@ -618,10 +703,9 @@ true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true - + Disabled $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) @@ -631,34 +715,28 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) user32.lib;shell32.lib;advapi32.lib;version.lib;MFCMapi.res;%(AdditionalDependencies) true Windows true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true - + Disabled $(SolutionDir);$(SolutionDir)\include;$(VCInstallDir)UnitTest\include;$(WindowsSdkDir)\include;%(AdditionalIncludeDirectories) @@ -668,16 +746,12 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks UnitTest\stdafx.h false - stdcpplatest false Guard @@ -691,18 +765,18 @@ true $(VCInstallDir)Auxiliary\VS\UnitTest\lib;$(WindowsSdkDir)\lib;$(SolutionDir)obj\$(Platform)\core\$(Configuration);%(AdditionalLibraryDirectories) true - true %WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe - $(MSBuildThisFileDirectory)\scripts\Build-SmartViewTests.ps1 - $(MSBuildThisFileDirectory)\SmartViewTestData\In - $(MSBuildThisFileDirectory)\SmartViewTestData\Out - $(IntDir)SmartViewTests.h - $(IntDir)\SmartViewTests.rc - $(IntDir)\SmartViewTests.cpp - $(PowerShellExe) -ExecutionPolicy Bypass -File $(BuildSmartViewTests) $(IntDir) + $(MSBuildThisFileDirectory)scripts\Build-SmartViewTests.ps1 + $(MSBuildThisFileDirectory)SmartViewTestData\In + $(MSBuildThisFileDirectory)SmartViewTestData\Out + $(MSBuildThisFileDirectory)gen\ + $(SVGenDir)SmartViewTests.h + $(SVGenDir)SmartViewTests.rc + $(SVGenDir)SmartViewTests.cpp + $(PowerShellExe) -ExecutionPolicy Bypass -File $(BuildSmartViewTests) $(SVGenDir) @@ -726,9 +800,9 @@ - - - + + + diff --git a/UnitTest/UnitTest.vcxproj.filters b/UnitTest/UnitTest.vcxproj.filters index 6d2adb6fd..5a2b4b128 100644 --- a/UnitTest/UnitTest.vcxproj.filters +++ b/UnitTest/UnitTest.vcxproj.filters @@ -75,12 +75,25 @@ - - - - - - - + + {8E41214B-6784-4F4F-A6AF-8D7724862B86} + + + {C5E8F54D-9A4D-4E5B-8B5C-7F5A3B7C9D1E} + + + + + Generated Files + + + Generated Files + + + Generated Files + + + scripts + \ No newline at end of file diff --git a/UnitTest/scripts/Build-SmartViewTests.ps1 b/UnitTest/scripts/Build-SmartViewTests.ps1 index 4d9f28a94..d02eb674d 100644 --- a/UnitTest/scripts/Build-SmartViewTests.ps1 +++ b/UnitTest/scripts/Build-SmartViewTests.ps1 @@ -33,9 +33,12 @@ $inSubDir = "SmartViewTestData\In" $outSubDir = "SmartViewTestData\Out" $inDir = Join-Path -Path $rootDir -ChildPath $inSubDir $outDir = Join-Path -Path $rootDir -ChildPath $outSubDir -$outputHeaderFile = Join-Path -Path $IntDir -ChildPath "SmartViewTests.h" -$outputRCFile = Join-Path -Path $IntDir -ChildPath "SmartViewTests.rc" -$outputCPPFile = Join-Path -Path $IntDir -ChildPath "SmartViewTests.cpp" +$headerFileName = "SmartViewTests.h" +$rcFileName = "SmartViewTests.rc" +$cppFileName = "SmartViewTests.cpp" +$outputHeaderFile = Join-Path -Path $IntDir -ChildPath $headerFileName +$outputRCFile = Join-Path -Path $IntDir -ChildPath $rcFileName +$outputCPPFile = Join-Path -Path $IntDir -ChildPath $cppFileName Write-Output "IntDir: $IntDir" Write-Output "inDir: $inDir" @@ -51,6 +54,12 @@ if (-Not (Test-Path -Path $outDir)) { throw "SmartView Out directory does not exist: $outDir" } +# Create output directory if it doesn't exist +if (-Not (Test-Path -Path $IntDir)) { + Write-Output "Creating output directory: $IntDir" + New-Item -ItemType Directory -Path $IntDir -Force | Out-Null +} + $defines = @() $resources = @() $tests = @() @@ -73,7 +82,7 @@ foreach ($file in $inDirfiles) { $defines += $define $define = "#define $nameOut $(1000000 + $index)" $defines += $define - $resource = "$nameIn TEXTFILE ""$inSubDir\$($file.Name)""" + $resource = "$nameIn TEXTFILE ""../$inSubDir/$($file.Name)""" $resource = $resource -replace '\\', '/' $resources += $resource $test = "`tTEST_METHOD($($parserName)_$($subIndex)) { unittest::test(parserType::$parserName, $nameIn , $nameOut); }" @@ -93,7 +102,7 @@ foreach ($file in $outDirFiles) { $subIndex = [int]$matches[2] $nameOut = "IDR_SV_$($parserName)_$($subIndex)_OUT" $nameOut = $nameOut.ToUpper() - $resource = "$nameOut TEXTFILE ""$outSubDir\$($file.Name)""" + $resource = "$nameOut TEXTFILE ""../$outSubDir/$($file.Name)""" $resource = $resource -replace '\\', '/' $resources += $resource } @@ -106,7 +115,7 @@ $tests = $tests -join "`r`n" # Generate the .h file $headerContent = @" // AUTOGENERATED FILE. DO NOT MODIFY. -// Used by $outputRCFile +// Used by $rcFileName #define TEXTFILE 256 $defines @@ -115,7 +124,7 @@ $defines # Generate the .rc file $rcContent = @" // AUTOGENERATED FILE. DO NOT MODIFY. -#include "$outputHeaderFile" +#include "$headerFileName" $resources "@ @@ -125,7 +134,7 @@ $cppContent = @" // AUTOGENERATED FILE. DO NOT MODIFY. #include #include -#include "$outputHeaderFile" +#include "$headerFileName" namespace SmartViewTest { diff --git a/core/core.vcxproj b/core/core.vcxproj index eaa27a7cf..d1dba32f1 100644 --- a/core/core.vcxproj +++ b/core/core.vcxproj @@ -28,22 +28,6 @@ Fuzz x64 - - Prefast_Unicode - Win32 - - - Prefast_Unicode - x64 - - - Prefast - Win32 - - - Prefast - x64 - Release_Unicode Win32 @@ -60,66 +44,71 @@ Release x64 + + Debug + ARM64 + + + Debug + ARM64EC + + + Debug_Unicode + ARM64 + + + Debug_Unicode + ARM64EC + + + Release + ARM64 + + + Release + ARM64EC + + + Release_Unicode + ARM64 + + + Release_Unicode + ARM64EC + {D2390ABA-E7B0-476D-BB38-089FEAB5357D} core Win32Proj - 10.0 StaticLibrary Static Unicode - v143 true - Spectre false StaticLibrary Static MultiByte - v143 true - Spectre - false - - - StaticLibrary - Static - MultiByte - v143 - false - Spectre - false - - - StaticLibrary - Static - Unicode - v143 - false - Spectre false StaticLibrary Static Unicode - v143 false - Spectre true StaticLibrary Static Unicode - v143 false - Spectre true true true @@ -128,63 +117,77 @@ StaticLibrary Static MultiByte - v143 false - Spectre true StaticLibrary Static Unicode - v143 true - Spectre + false + + + StaticLibrary + Static + Unicode + true + false + + + StaticLibrary + Static + Unicode + true false StaticLibrary Static MultiByte - v143 true - Spectre false - + StaticLibrary Static MultiByte - v143 - false - Spectre + true false - + StaticLibrary Static - Unicode - v143 - false - Spectre + MultiByte + true false StaticLibrary Static Unicode - v143 false - Spectre + true + + + StaticLibrary + Static + Unicode + false + true + + + StaticLibrary + Static + Unicode + false true StaticLibrary Static Unicode - v143 false - Spectre true true true @@ -193,9 +196,21 @@ StaticLibrary Static MultiByte - v143 false - Spectre + true + + + StaticLibrary + Static + MultiByte + false + true + + + StaticLibrary + Static + MultiByte + false true @@ -209,12 +224,6 @@ - - - - - - @@ -230,12 +239,6 @@ - - - - - - @@ -261,35 +264,39 @@ true - - 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 - true + + true + + + true + true - - true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset + + true - - true - ..\.gdn\i\nuget\Microsoft.Security.CodeAnalysis.PREfast.Cli.win-x64.1.6.0\tools\Sdl.Recommended.Warning.ruleset + + true + + + + + + + + MaxSpeed @@ -299,16 +306,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true core/stdafx.h - stdcpplatest false Guard @@ -333,16 +336,70 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true core/stdafx.h - stdcpplatest + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Windows + true + true + true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + core/stdafx.h + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Windows + true + true + true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + core/stdafx.h false Guard @@ -366,16 +423,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true core/stdafx.h - stdcpplatest false Guard @@ -400,16 +453,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true core/stdafx.h - stdcpplatest false Guard @@ -434,16 +483,70 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true core/stdafx.h - stdcpplatest + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Windows + true + true + true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + core/stdafx.h + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Windows + true + true + true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + MultiThreaded + true + Use + ProgramDatabase + true + true + Default + true + core/stdafx.h false Guard @@ -467,16 +570,12 @@ MultiThreaded true Use - Level4 - true ProgramDatabase true - true true Default true core/stdafx.h - stdcpplatest false Guard @@ -500,16 +599,12 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false core/stdafx.h - stdcpplatest false Guard @@ -523,7 +618,7 @@ true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -532,30 +627,25 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false core/stdafx.h - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) true Windows true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -564,30 +654,25 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false core/stdafx.h - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) true Windows true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -596,16 +681,12 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false core/stdafx.h - stdcpplatest false Guard @@ -618,56 +699,49 @@ true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false core/stdafx.h - stdcpplatest false Guard - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + /safeseh %(AdditionalOptions) true Windows true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false core/stdafx.h - stdcpplatest false Guard @@ -680,7 +754,7 @@ true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -689,30 +763,25 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false core/stdafx.h - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) true Windows true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -721,16 +790,12 @@ MultiThreadedDebug true Use - Level4 - true ProgramDatabase true - true false EnableFastChecks false core/stdafx.h - stdcpplatest false Guard diff --git a/docs/Fuzzing.md b/docs/Fuzzing.md new file mode 100644 index 000000000..6a7f221fb --- /dev/null +++ b/docs/Fuzzing.md @@ -0,0 +1,75 @@ +# Fuzzing MFCMAPI + +MFCMAPI supports fuzzing with [libFuzzer](https://llvm.org/docs/LibFuzzer.html) and the [fsanitize](https://learn.microsoft.com/en-us/cpp/build/reference/fsanitize?view=msvc-170) switch in Visual Studio. See [fuzz.cpp](../fuzz/fuzz.cpp) for implementation details. + +## Prerequisites + +- Visual Studio 2026 with the Fuzz build configuration +- PowerShell for corpus generation + +## Quick Start + +```bash +# 1. Generate the corpus (converts hex test data to binary) +npm run fuzz:corpus + +# 2. Build the fuzz configuration +npm run build:fuzz + +# 3. Run from VS Code: select "Fuzz (x64)" and press F5 +``` + +## Building the Fuzzing Corpus + +The fuzzer needs binary input files. The unit test data is stored as hex strings in `.dat` files. Run the corpus builder to convert them: + +```bash +npm run fuzz:corpus +``` + +This reads from `UnitTest/SmartViewTestData/In/*.dat` and writes binary files to `fuzz/corpus/`. + +> **Note:** You must run this before fuzzing. The corpus directory won't exist until you do. + +## Building the Fuzz Configuration + +### From Command Line + +```bash +npm run build:fuzz +``` + +### From Visual Studio + +1. Open `MFCMapi.sln` in Visual Studio 2026 +2. Select **Fuzz** from the Solution Configurations dropdown +3. Build the solution + +## Running the Fuzzer + +### From VS Code + +1. Run `pwsh fuzz/Build-FuzzingCorpus.ps1` first (if you haven't already) +2. Open the Run and Debug panel (Ctrl+Shift+D) +3. Select "Fuzz (x64)" or "Fuzz (x86)" from the configuration dropdown +4. Press F5 to start + +The fuzzer runs for 60 seconds by default. + +### From Command Line + +```bash +./bin/x64/Fuzz/MFCMapi.exe fuzz/corpus -artifact_prefix=fuzz/artifacts/ -max_total_time=60 +``` + +### From Visual Studio + +Set the debug command line arguments: + +``` +$(ProjectDir)fuzz\corpus -artifact_prefix=$(ProjectDir)fuzz\artifacts\ +``` + +## Artifacts + +When the fuzzer discovers a crash or hang, it saves the input that caused it to `fuzz/artifacts/`. These files can be used to reproduce and debug the issue. diff --git a/exampleMapiConsoleApp/exampleMapiConsoleApp.vcxproj b/exampleMapiConsoleApp/exampleMapiConsoleApp.vcxproj index e792a1c43..e3e43b62b 100644 --- a/exampleMapiConsoleApp/exampleMapiConsoleApp.vcxproj +++ b/exampleMapiConsoleApp/exampleMapiConsoleApp.vcxproj @@ -20,22 +20,6 @@ Debug x64 - - Prefast_Unicode - Win32 - - - Prefast_Unicode - x64 - - - Prefast - Win32 - - - Prefast - x64 - Release_Unicode Win32 @@ -52,108 +36,139 @@ Release x64 + + Debug + ARM64 + + + Debug + ARM64EC + + + Debug_Unicode + ARM64 + + + Debug_Unicode + ARM64EC + + + Release + ARM64 + + + Release + ARM64EC + + + Release_Unicode + ARM64 + + + Release_Unicode + ARM64EC + {0E30B8F5-4480-4130-BC46-BABA613B983F} exampleMapiConsoleApp Win32Proj - 10.0 Application Unicode - v143 true - Spectre false Application MultiByte - v143 true - Spectre - false - - - Application - MultiByte - v143 - false - Spectre - false - - - Application - Unicode - v143 - false - Spectre false Application Unicode - v143 false - Spectre true Application MultiByte - v143 false - Spectre true Application Unicode - v143 true - Spectre + false + + + Application + Unicode + true + false + + + Application + Unicode + true false Application MultiByte - v143 true - Spectre false - + Application MultiByte - v143 - false - Spectre + true false - + Application - Unicode - v143 - false - Spectre + MultiByte + true false Application Unicode - v143 false - Spectre + true + + + Application + Unicode + false + true + + + Application + Unicode + false true Application MultiByte - v143 false - Spectre + true + + + Application + MultiByte + false + true + + + Application + MultiByte + false true @@ -167,12 +182,6 @@ - - - - - - @@ -185,12 +194,6 @@ - - - - - - @@ -208,30 +211,26 @@ - - 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 - + + - - 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 + - + + + + + MaxSpeed @@ -240,15 +239,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -264,7 +259,6 @@ true true true - true @@ -275,15 +269,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -298,7 +288,64 @@ true true true - true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreaded + true + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Console + true + true + true + true + true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;%(PreprocessorDefinitions) + true + MultiThreaded + true + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Console + true + true + true + true + true @@ -309,15 +356,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -333,7 +376,6 @@ true true true - true @@ -344,15 +386,11 @@ true MultiThreaded true - Level4 - true ProgramDatabase true - true true Default true - stdcpplatest false Guard @@ -367,7 +405,64 @@ true true true - true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + MultiThreaded + true + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Console + true + true + true + true + true + + + + + MaxSpeed + $(SolutionDir)\include;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;UNICODE;%(PreprocessorDefinitions) + true + MultiThreaded + true + ProgramDatabase + true + true + Default + true + false + Guard + + + _AFXDLL;NDEBUG;_WIN64;%(PreprocessorDefinitions) + + + true + Console + true + true + true + true + true @@ -378,15 +473,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -399,10 +490,9 @@ true true true - true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -410,31 +500,25 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) true Console true true - true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -442,31 +526,25 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) true Console true true - true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -474,15 +552,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -494,56 +568,48 @@ Console true true - true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true - true false + EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + /safeseh %(AdditionalOptions) true Console true true - true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;%(PreprocessorDefinitions) + WIN32;_DEBUG;UNICODE;%(PreprocessorDefinitions) true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false + EnableFastChecks false - stdcpplatest false Guard @@ -555,10 +621,9 @@ Console true true - true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -566,31 +631,25 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard - _AFXDLL;_DEBUG;%(PreprocessorDefinitions) + _AFXDLL;_DEBUG;_WIN64;%(PreprocessorDefinitions) - /safeseh %(AdditionalOptions) true Console true true - true - + Disabled $(SolutionDir)\include;%(AdditionalIncludeDirectories) @@ -598,15 +657,11 @@ true MultiThreadedDebug true - Level4 - true ProgramDatabase true - true false EnableFastChecks false - stdcpplatest false Guard @@ -618,7 +673,6 @@ Console true true - true diff --git a/mapistub b/mapistub index f70283771..9700f1f43 160000 --- a/mapistub +++ b/mapistub @@ -1 +1 @@ -Subproject commit f70283771cd60b11616b53f089c7c519ac30101c +Subproject commit 9700f1f43dc58ce156bd381cec8ff54940c46900 diff --git a/package.json b/package.json index 4738d10da..1b1c6f8a4 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,118 @@ { + "name": "mfcmapi", + "version": "1.0.0", + "description": "MFCMAPI - Microsoft MAPI inspection tool", + "scripts": { + "prereq": "pwsh scripts/Check-Prerequisites.ps1", + "msbuild": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\MSBuild\\Current\\Bin\\amd64\\msbuild.exe\\\" @args\"", + "vstest": "powershell -Command \"$vs = & \\\"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\\\" -latest -property installationPath; & \\\"$vs\\Common7\\IDE\\CommonExtensions\\Microsoft\\TestWindow\\vstest.console.exe\\\" @args\"", + + "build": "npm run build:debug", + "build:debug": "npm run build:debug:x64", + "build:debug:x64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug_Unicode /p:Platform=x64", + "build:debug:x86": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug_Unicode /p:Platform=Win32", + "build:release": "npm run build:release:x64", + "build:release:x64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=x64", + "build:release:x86": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=Win32", + + "build:debug:ansi": "npm run build:debug:ansi:x64", + "build:debug:ansi:x64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug /p:Platform=x64", + "build:debug:ansi:x86": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug /p:Platform=Win32", + "build:release:ansi": "npm run build:release:ansi:x64", + "build:release:ansi:x64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=x64", + "build:release:ansi:x86": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=Win32", + + "build:prefast": "npm run build:prefast:x64", + "build:prefast:x64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=x64 /p:EnablePREfast=true /p:RunCodeAnalysis=true", + "build:prefast:x86": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=Win32 /p:EnablePREfast=true /p:RunCodeAnalysis=true", + "build:prefast:ansi": "npm run build:prefast:ansi:x64", + "build:prefast:ansi:x64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=x64 /p:EnablePREfast=true /p:RunCodeAnalysis=true", + "build:prefast:ansi:x86": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=Win32 /p:EnablePREfast=true /p:RunCodeAnalysis=true", + + "build:fuzz": "npm run build:fuzz:x64", + "build:fuzz:x64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Fuzz /p:Platform=x64", + "build:fuzz:x86": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Fuzz /p:Platform=Win32", + "fuzz:corpus": "pwsh fuzz/Build-FuzzingCorpus.ps1", + + "build:all": "npm run build:all:x64 && npm run build:all:x86", + "build:all:x64": "npm run build:debug:x64 && npm run build:release:x64 && npm run build:debug:ansi:x64 && npm run build:release:ansi:x64 && npm run build:fuzz:x64", + "build:all:x86": "npm run build:debug:x86 && npm run build:release:x86 && npm run build:debug:ansi:x86 && npm run build:release:ansi:x86 && npm run build:fuzz:x86", + + "clean": "npm run clean:all", + "clean:all": "npm run clean:all:x64 && npm run clean:all:x86", + "clean:all:x64": "npm run clean:debug:x64 && npm run clean:release:x64 && npm run clean:debug:ansi:x64 && npm run clean:release:ansi:x64 && npm run clean:fuzz:x64", + "clean:all:x86": "npm run clean:debug:x86 && npm run clean:release:x86 && npm run clean:debug:ansi:x86 && npm run clean:release:ansi:x86 && npm run clean:fuzz:x86", + + "clean:debug": "npm run clean:debug:x64", + "clean:debug:x64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=x64", + "clean:debug:x86": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=Win32", + "clean:release": "npm run clean:release:x64", + "clean:release:x64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=x64", + "clean:release:x86": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=Win32", + + "clean:debug:ansi": "npm run clean:debug:ansi:x64", + "clean:debug:ansi:x64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug /p:Platform=x64", + "clean:debug:ansi:x86": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug /p:Platform=Win32", + "clean:release:ansi": "npm run clean:release:ansi:x64", + "clean:release:ansi:x64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release /p:Platform=x64", + "clean:release:ansi:x86": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release /p:Platform=Win32", + + "clean:fuzz": "npm run clean:fuzz:x64", + "clean:fuzz:x64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Fuzz /p:Platform=x64", + "clean:fuzz:x86": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Fuzz /p:Platform=Win32", + + "test": "npm run test:debug", + "test:debug": "npm run test:debug:x64", + "test:debug:x64": "npm run vstest -- bin/x64/UnitTest/Debug_Unicode/UnitTest.dll /logger:console", + "test:debug:x86": "npm run vstest -- bin/Win32/UnitTest/Debug_Unicode/UnitTest.dll /logger:console", + "test:release": "npm run test:release:x64", + "test:release:x64": "npm run vstest -- bin/x64/UnitTest/Release_Unicode/UnitTest.dll /logger:console", + "test:release:x86": "npm run vstest -- bin/Win32/UnitTest/Release_Unicode/UnitTest.dll /logger:console", + "test:debug:ansi": "npm run test:debug:ansi:x64", + "test:debug:ansi:x64": "npm run vstest -- bin/x64/UnitTest/Debug/UnitTest.dll /logger:console", + "test:debug:ansi:x86": "npm run vstest -- bin/Win32/UnitTest/Debug/UnitTest.dll /logger:console", + "test:release:ansi": "npm run test:release:ansi:x64", + "test:release:ansi:x64": "npm run vstest -- bin/x64/UnitTest/Release/UnitTest.dll /logger:console", + "test:release:ansi:x86": "npm run vstest -- bin/Win32/UnitTest/Release/UnitTest.dll /logger:console", + + "build:debug:arm64ec": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64EC", + "build:release:arm64ec": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64EC", + "build:debug:ansi:arm64ec": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug /p:Platform=ARM64EC", + "build:release:ansi:arm64ec": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=ARM64EC", + "build:prefast:arm64ec": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64EC /p:EnablePREfast=true /p:RunCodeAnalysis=true", + "build:prefast:ansi:arm64ec": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=ARM64EC /p:EnablePREfast=true /p:RunCodeAnalysis=true", + "build:all:arm64ec": "npm run build:debug:arm64ec && npm run build:release:arm64ec && npm run build:debug:ansi:arm64ec && npm run build:release:ansi:arm64ec", + + "clean:debug:arm64ec": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=ARM64EC", + "clean:release:arm64ec": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=ARM64EC", + "clean:debug:ansi:arm64ec": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug /p:Platform=ARM64EC", + "clean:release:ansi:arm64ec": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release /p:Platform=ARM64EC", + "clean:all:arm64ec": "npm run clean:debug:arm64ec && npm run clean:release:arm64ec && npm run clean:debug:ansi:arm64ec && npm run clean:release:ansi:arm64ec", + + "test:debug:arm64ec": "npm run vstest -- bin/ARM64EC/UnitTest/Debug_Unicode/UnitTest.dll /logger:console", + "test:release:arm64ec": "npm run vstest -- bin/ARM64EC/UnitTest/Release_Unicode/UnitTest.dll /logger:console", + "test:debug:ansi:arm64ec": "npm run vstest -- bin/ARM64EC/UnitTest/Debug/UnitTest.dll /logger:console", + "test:release:ansi:arm64ec": "npm run vstest -- bin/ARM64EC/UnitTest/Release/UnitTest.dll /logger:console", + + "build:debug:arm64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug_Unicode /p:Platform=ARM64", + "build:release:arm64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64", + "build:debug:ansi:arm64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Debug /p:Platform=ARM64", + "build:release:ansi:arm64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=ARM64", + "build:prefast:arm64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release_Unicode /p:Platform=ARM64 /p:EnablePREfast=true /p:RunCodeAnalysis=true", + "build:prefast:ansi:arm64": "npm run msbuild -- MFCMapi.sln /m /p:Configuration=Release /p:Platform=ARM64 /p:EnablePREfast=true /p:RunCodeAnalysis=true", + "build:all:arm64": "npm run build:debug:arm64 && npm run build:release:arm64 && npm run build:debug:ansi:arm64 && npm run build:release:ansi:arm64", + + "clean:debug:arm64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug_Unicode /p:Platform=ARM64", + "clean:release:arm64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release_Unicode /p:Platform=ARM64", + "clean:debug:ansi:arm64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Debug /p:Platform=ARM64", + "clean:release:ansi:arm64": "npm run msbuild -- MFCMapi.sln /t:Clean /p:Configuration=Release /p:Platform=ARM64", + "clean:all:arm64": "npm run clean:debug:arm64 && npm run clean:release:arm64 && npm run clean:debug:ansi:arm64 && npm run clean:release:ansi:arm64", + + "test:debug:arm64": "npm run vstest -- bin/ARM64/UnitTest/Debug_Unicode/UnitTest.dll /logger:console", + "test:release:arm64": "npm run vstest -- bin/ARM64/UnitTest/Release_Unicode/UnitTest.dll /logger:console", + "test:debug:ansi:arm64": "npm run vstest -- bin/ARM64/UnitTest/Debug/UnitTest.dll /logger:console", + "test:release:ansi:arm64": "npm run vstest -- bin/ARM64/UnitTest/Release/UnitTest.dll /logger:console" + }, "devDependencies": { "clang-format": "^1.8.0" } diff --git a/scripts/Check-Prerequisites.ps1 b/scripts/Check-Prerequisites.ps1 new file mode 100644 index 000000000..3e599b21c --- /dev/null +++ b/scripts/Check-Prerequisites.ps1 @@ -0,0 +1,176 @@ +# Check-Prerequisites.ps1 +# Validates that the development environment has all required components + +param( + [switch]$Quiet, + [switch]$Install +) + +$script:errors = @() +$script:warnings = @() + +function Write-Status { + param([string]$Message, [string]$Status, [ConsoleColor]$Color = "White") + if (-not $Quiet) { + Write-Host "$Message " -NoNewline + Write-Host $Status -ForegroundColor $Color + } +} + +function Test-VSInstallation { + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path $vswhere)) { + $script:errors += "Visual Studio is not installed" + Write-Status "Visual Studio 2026:" "NOT FOUND" Red + return $null + } + + # Look for VS 2026 (version 18.x) + $vs = & $vswhere -version "[18.0,19.0)" -requires Microsoft.VisualStudio.Workload.NativeDesktop -property installationPath -latest + if (-not $vs) { + # Check if any VS is installed + $anyVs = & $vswhere -latest -property installationVersion + if ($anyVs) { + $script:errors += "Visual Studio 2026 with Desktop C++ workload is required (found VS $anyVs)" + } else { + $script:errors += "Visual Studio 2026 with Desktop C++ workload is required" + } + Write-Status "Visual Studio 2026:" "NOT FOUND" Red + return $null + } + + $version = & $vswhere -version "[18.0,19.0)" -property installationVersion -latest + Write-Status "Visual Studio 2026:" "$version" Green + return $vs +} + +function Test-WindowsSDK { + param([string]$RequiredVersion = "10.0.22621.0") + + $sdkPath = "${env:ProgramFiles(x86)}\Windows Kits\10\Include\$RequiredVersion" + if (Test-Path $sdkPath) { + Write-Status "Windows SDK $RequiredVersion`:" "FOUND" Green + return $true + } + + $script:errors += "Windows 11 SDK ($RequiredVersion) is not installed" + Write-Status "Windows SDK $RequiredVersion`:" "NOT FOUND" Red + return $false +} + +function Test-VC145Toolset { + param([string]$VSPath) + + if (-not $VSPath) { return $false } + + $toolsetPath = Join-Path $VSPath "VC\Tools\MSVC" + if (Test-Path $toolsetPath) { + # v145 toolset versions start with 14.5x + $v145Versions = Get-ChildItem $toolsetPath -Directory | Where-Object { $_.Name -match '^14\.5' } | Sort-Object Name -Descending + if ($v145Versions) { + $latest = $v145Versions[0].Name + Write-Status "VC++ Toolset (v145):" "$latest" Green + return $true + } + } + + $script:errors += "VC++ v145 toolset is not installed" + Write-Status "VC++ Toolset (v145):" "NOT FOUND" Red + return $false +} + +function Test-SpectreLibraries { + param([string]$VSPath) + + if (-not $VSPath) { return $false } + + $toolsetPath = Join-Path $VSPath "VC\Tools\MSVC" + $versions = Get-ChildItem $toolsetPath -Directory -ErrorAction SilentlyContinue | Sort-Object Name -Descending + if (-not $versions) { return $false } + + $spectrePath = Join-Path $versions[0].FullName "lib\spectre" + if (Test-Path $spectrePath) { + Write-Status "Spectre-mitigated libs:" "FOUND" Green + return $true + } + + $script:warnings += "Spectre-mitigated libraries not installed (optional but recommended)" + Write-Status "Spectre-mitigated libs:" "NOT FOUND" Yellow + return $false +} + +function Test-NodeJS { + $node = Get-Command node -ErrorAction SilentlyContinue + if ($node) { + $version = & node --version + Write-Status "Node.js:" "$version" Green + return $true + } + + $script:warnings += "Node.js not installed (optional - needed for npm build scripts)" + Write-Status "Node.js:" "NOT FOUND (optional)" Yellow + return $false +} + +function Install-MissingComponents { + if ($script:errors.Count -eq 0) { + Write-Host "`nAll required components are installed!" -ForegroundColor Green + return + } + + Write-Host "`nMissing components detected." -ForegroundColor Yellow + + # Check if VS Installer can help + $vsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" + if (Test-Path $vsInstaller) { + Write-Host "`nYou can install missing components using the .vsconfig file:" -ForegroundColor Cyan + Write-Host " 1. Open Visual Studio Installer" + Write-Host " 2. Click 'More' > 'Import configuration'" + Write-Host " 3. Select: $PSScriptRoot\..\.vsconfig" + Write-Host "" + Write-Host "Or run:" -ForegroundColor Cyan + Write-Host " & '$vsInstaller' modify --installPath '' --config '$PSScriptRoot\..\.vsconfig'" + } else { + Write-Host "`nPlease install Visual Studio 2026 from:" -ForegroundColor Cyan + Write-Host " https://visualstudio.microsoft.com/vs/" + } +} + +# Main +if (-not $Quiet) { + Write-Host "Checking MFCMAPI build prerequisites...`n" -ForegroundColor Cyan +} + +$vsPath = Test-VSInstallation +Test-WindowsSDK -RequiredVersion "10.0.22621.0" | Out-Null +Test-VC145Toolset -VSPath $vsPath | Out-Null +Test-SpectreLibraries -VSPath $vsPath | Out-Null +Test-NodeJS | Out-Null + +if (-not $Quiet) { + Write-Host "" +} + +if ($script:errors.Count -gt 0) { + if (-not $Quiet) { + Write-Host "ERRORS:" -ForegroundColor Red + $script:errors | ForEach-Object { Write-Host " - $_" -ForegroundColor Red } + } + + if ($Install) { + Install-MissingComponents + } + + exit 1 +} + +if ($script:warnings.Count -gt 0 -and -not $Quiet) { + Write-Host "WARNINGS:" -ForegroundColor Yellow + $script:warnings | ForEach-Object { Write-Host " - $_" -ForegroundColor Yellow } +} + +if (-not $Quiet) { + Write-Host "`nAll required prerequisites are installed!" -ForegroundColor Green +} + +exit 0 diff --git a/scripts/prefast.proj b/scripts/prefast.proj index c33a7a6dc..f133233e2 100644 --- a/scripts/prefast.proj +++ b/scripts/prefast.proj @@ -1,4 +1,6 @@  + +