Skip to content

feat: mount and unmount ISO/IMG/VHD(X) images with the native Windows API - #209

Merged
nextestudios merged 3 commits into
mainfrom
feature/73-mount-images
Sep 27, 2026
Merged

nextestudios merged 3 commits into
mainfrom
feature/73-mount-images

Conversation

@nextestudios

Copy link
Copy Markdown
Owner

Summary

  • New IDiskImageService (Core) and VirtualDiskService (Infrastructure.Windows) over virtdisk.dll: OpenVirtualDisk + AttachVirtualDisk (permanent lifetime like Explorer's Mount; ISO/IMG read-only), GetVirtualDiskPhysicalPath + IOCTL_STORAGE_GET_DEVICE_NUMBER to find the new drive letter, GetStorageDependencyInformation to find the image behind a drive (also for images mounted by Windows), DetachVirtualDisk to unmount. No shell, no command line, no third-party drivers; paths are only passed to the API.
  • Already-mounted images just open their drive; a mounted VHD without a usable volume is detached again with an explanation. Win32 errors are mapped to readable messages (not an image, damaged, sparse/compressed, in use, needs admin for VHD).
  • UI: North on .iso/.img/.vhd/.vhdx → Montar imagem (opens the new drive). North on a drive that is a mounted image (This PC and Home; checked off the UI thread) → Desmontar imagem… with a confirmation that starts on Cancel and warns about open files; tabs inside the drive go back to This PC.

Tests

  • CI: DiskImageJourneyTests (fake service: error explained, mount opens the drive, unmount confirmation and removal) and DiskImageIntegrationTests (Windows: a minimal ISO 9660 generated in the test is mounted, read, identified via ImageBehind, re-mount returns the same drive, unmount removes it).
  • Manual (docs/TESTING.md): standard user, VHDX without admin, images mounted by Explorer, open files while unmounting.

Closes #73
Closes #74

🤖 Generated with Claude Code

@nextestudios
nextestudios force-pushed the feature/73-mount-images branch from aa80964 to 81fd928 Compare September 27, 2026 22:34
nextestudios and others added 3 commits September 27, 2026 19:39
… API

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nextestudios
nextestudios force-pushed the feature/73-mount-images branch from 5d92011 to a8764b5 Compare September 27, 2026 22:39
@nextestudios
nextestudios merged commit 6be2ab6 into main Sep 27, 2026
1 check passed
@nextestudios
nextestudios deleted the feature/73-mount-images branch September 27, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add ISO unmount support feat: add ISO mounting support

1 participant