mirror of
https://github.com/armbian/imager.git
synced 2026-01-06 12:31:28 -08:00
Fix Windows flash access denied and UI freeze issues
- Replace PowerShell-based partition discovery with Windows API (FindFirstVolumeW/FindNextVolumeW, IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS) - Lock and dismount volumes before raw disk access using FSCTL_LOCK_VOLUME and FSCTL_DISMOUNT_VOLUME - Keep volume handles open during operation to prevent Windows remount - Use FILE_FLAG_WRITE_THROUGH for writes, FILE_FLAG_NO_BUFFERING for verification to bypass OS cache - Fix intermittent UI freeze by releasing volume locks in background threads with FSCTL_UNLOCK_VOLUME before CloseHandle - Add sector-aligned reads for verification when using NO_BUFFERING
This commit is contained in:
@@ -45,6 +45,12 @@ security-framework-sys = "2.11"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
# Windows-specific dependencies
|
||||
windows-sys = { version = "0.61.2", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Storage_FileSystem",
|
||||
"Win32_System_Ioctl",
|
||||
"Win32_System_IO"
|
||||
] }
|
||||
|
||||
[features]
|
||||
default = ["custom-protocol"]
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user