Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ebfbc90
Upgrade to Visual Studio 2026 (v145 toolset)
stephenegriffin Feb 6, 2026
6ac3bf4
Add npm scripts for building, testing, and cleaning
stephenegriffin Feb 6, 2026
b00b9b2
Update VS Code tasks and launch configs to use npm scripts
stephenegriffin Feb 6, 2026
1a22155
Add fuzz launch configurations for VS Code
stephenegriffin Feb 6, 2026
234594d
Restructure documentation for end users vs developers
stephenegriffin Feb 6, 2026
c9c643f
Add prerequisite check and fuzz corpus npm scripts
stephenegriffin Feb 6, 2026
4ab814e
Use VS 2026 preview runner for GitHub Actions
stephenegriffin Feb 6, 2026
f9b519e
ensure config
stephenegriffin Feb 6, 2026
a348eed
update mapistub
stephenegriffin Feb 6, 2026
f3f0be2
install sdk
stephenegriffin Feb 6, 2026
7163c3b
update stub
stephenegriffin Feb 6, 2026
6ffad71
Merge branch 'main' into u/sgriffin/vs2026
stephenegriffin Feb 6, 2026
4112e78
updaet codeql
stephenegriffin Feb 6, 2026
d81937a
add arm builds
stephenegriffin Feb 6, 2026
ae2e354
change codeql to manual build
stephenegriffin Feb 9, 2026
298e770
udpate mapistub
stephenegriffin Feb 9, 2026
a4db165
update mapistub
stephenegriffin Feb 9, 2026
82cd0b8
codeql v4
stephenegriffin Feb 9, 2026
1d1ba6f
Merge branch 'main' into u/sgriffin/vs2026
stephenegriffin Feb 17, 2026
442aeb3
make unittest source browsing a little nicer
stephenegriffin Feb 17, 2026
423078f
sort source files better in VS
stephenegriffin Feb 17, 2026
fa8d431
Modernize project structure and remove Prefast configurations
stephenegriffin Feb 17, 2026
674353e
Remove migration plan
stephenegriffin Feb 17, 2026
e139ad0
update clang action
stephenegriffin Feb 17, 2026
46d030c
Add arm
stephenegriffin Feb 18, 2026
c4e5451
add missing build task
stephenegriffin Feb 18, 2026
4eac433
update prereqs
stephenegriffin Feb 18, 2026
621527b
fix build args
stephenegriffin Feb 18, 2026
6868816
add arm64 for real
stephenegriffin Feb 18, 2026
7068ead
cut file, cut fuzz arm, clean up
stephenegriffin Feb 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

- 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
46 changes: 42 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5
Expand All @@ -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@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devskim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
path: devskim-results.sarif
73 changes: 69 additions & 4 deletions .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,20 +44,55 @@ 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: |
$path = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
& $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 }
echo "Using VSDevTestCmd: ${VSDevTestCmd}"
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
Expand All @@ -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
Expand All @@ -86,4 +151,4 @@ jobs:
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@27d65e188ec43221b20d26de30f4892fad91df2f # v2.22.0
with:
files: "artifacts/**/*.trx"
files: "artifacts/**/*.trx"
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@45cbd0c69e560cd9e7cd7f8c32362050c9b7ded2 # v3.29.5
uses: github/codeql-action/upload-sarif@b5ebac6f4c00c8ccddb7cdcd45fdb248329f808a # v3.32.2
with:
sarif_file: results.sarif
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
/node_modules
/packages
/fuzz/corpus/
/fuzz/artifacts/
/fuzz/artifacts/
/UnitTest/gen/
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"ms-vscode.cpptools",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.powershell"
]
}
Loading
Loading