UNDER THE HOOD

Engineered clean.
Built for 2026.

Every line hand-written. No frameworks. No bloat. Just Windows APIs, C++17, and 3 DLLs that each do one job perfectly.

How it fits together

CobvuzVirtual.exe
Win32 GUI · MainWindow · VMCreationWizard · 6 .cpp source files
↓ calls ↓
HyperVBridge.dll
VM lifecycle · WMI calls · VHDX creation
FirmwareManager.dll
SeaBIOS / OVMF · path · validation
VMStorage.dll
.cvm configs · VM folders · VHDX paths
↓ talks to ↓
Windows Hyper-V · root\virtualization\v2 WMI
Msvm_ComputerSystem · Msvm_VirtualSystemManagementService · Msvm_ImageManagementService
DLL 1

HyperVBridge.dll

The core of the application. Wraps the entire Hyper-V WMI surface so the main EXE doesn't need to link WMI headers directly. Manages COM connection, proxy blanket security, and async state changes.

Key design decision: every exported function that calls s_pSvc calls SetupThreadCOM() first, ensuring the proxy blanket is valid on any thread that invokes it — fixing the 0x800401f0 error that occurs when worker threads call COM without initialising first.

// Internal flow for HVB_StartVM(guid)
1. CoInitializeEx(COINIT_APARTMENTTHREADED)
2. SetupThreadCOM() → CoSetProxyBlanket
3. Get Msvm_ComputerSystem by GUID
4. ExecMethod("RequestStateChange", state=2)
5. CoUninitialize()
DLL 2

FirmwareManager.dll

Manages the two firmware files stored in the firmware\ subfolder next to the EXE. Validates that each file exists and has a sane size (SeaBIOS ≥ 64 KB, OVMF ≥ 1 MB).

Used by the wizard to verify firmware before creating a VM, and can deploy (copy) firmware into a VM's working directory for per-VM isolation.

// Firmware file locations
firmware\seabios.bin ← from bios.bin (QEMU)
firmware\OVMF.fd ← edk2-x86_64-code.fd
// Validation
SeaBIOS: size ≥ 65,536 bytes
OVMF: size ≥ 1,048,576 bytes
DLL 3

VMStorage.dll

Manages all on-disk VM data. Each VM gets its own folder inside the storage root (default: Documents\Cobvuz VMs\). Configs are stored as plain key=value .cvm files — human-readable and easy to back up.

The storage root is configurable in Settings. Changing it takes effect immediately — existing VMs in the new folder are discovered on next launch.

// Folder structure
Documents\Cobvuz VMs\
Windows 10\
Windows 10.cvm ← config
Windows 10.vhdx ← disk
Ubuntu 24\
Ubuntu 24.cvm
Ubuntu 24.vhdx

Build Information

C++17
Language standard
v143
MSVC toolset
10.0.26100
Windows SDK
x64
Target platform
4 / 1
Projects / Solution