Commit Graph

53 Commits

Author SHA1 Message Date
Pete Batard e7b66e7e4c
[mingw] use delay loading for DLLs that are subject to side loading
* This reverts much of commits f6ac559f4d and 1947266837
  so that we call the Windows APIs directly again, while ensuring that, by the time we load the DLLs,
  sideloading mitigation has already been applied by the application.
* This is a continuation of #1877, and should help prevent re-introducing side-loading issues when we
  link against new libraries, as well as allow us to drop some of the manual DLL hooking we've been
  doing to prevent it, to clean up the code.
* Note that this is a bit more complex than what the stackoverflow post suggests, because we need to
  create delayloaded libs for both 32-bit and 64-bit, which use a different calling convention and
  therefore need to use different .def files. So there's a lot of gymkhana involved, with Makefiles
  and whatnot, to get us there.
* Also simplify the use of CM_Get_DevNode_Registry_PropertyA() in dev.c since recent versions of
  MinGW now have support for it.
* Also fix 2 small issues in net.c (potential overflow) and format.c (memory leak).
2022-04-12 11:09:59 +01:00
Pete Batard 036f6260c5
[ui] fix regression in conditional expression and use %c always
* This fixes the regression introduced in c28f9bc491.
* 'if ((a && !b) || (!a && b))' can not always be simplified as 'if (a != b)' when the types for 'a' and 'b' are not straight booleans.
* Closes #1862
* Also drop the use of '%C' in printf() expression, as it is intended to print wide characters and not turn a char to uppercase.
2022-01-31 16:55:42 +00:00
Pete Batard c28f9bc491
[misc] fix PVS-Studio warnings 2022-01-05 12:57:26 +01:00
Pete Batard f0047986e7
[dev] add support for intel NUC card readers
* Also make sure that cards larger than 200 GB are not listed by default.
2021-09-09 22:20:57 +02:00
Pete Batard 16c0e8e2a2
[misc] UFD vs HDD detection improvements 2021-04-23 12:03:43 +01:00
Pete Batard fce645543f
[dev] add exception for Realtek card readers
* Also update copyright year to 2021
* Also update version for rufus-next
* Also set Win32 "A" APIs to UTF-8 and enable long paths in manifest
2021-01-06 19:27:31 +00:00
Pete Batard b3caf638b6
[misc] miscellaneous code cleanup and fixes
* Don't use hDrive handle for longer than necessary
* Move all the popcount() function calls into missing.h
* Ensure that the thread_affinity[] array is properly sized
* Improve timeouts for conflicting process search
2020-09-09 17:00:39 +01:00
Pete Batard c2017ad659
[dev] add exception for SSDs sitting behind a VIA-Labs adapter
* Also adjust the sizes under and above which we consider a drive is UFD/HDD
2020-08-01 15:36:59 +01:00
Pete Batard ba3665d990
[dev] add exception for SanDisk SSD U100 2020-06-03 11:20:30 +01:00
Pete Batard 077f143252
[core] add cheat mode to disable VHD listing (Alt-G) 2020-04-27 10:28:00 +01:00
Pete Batard 155b86bc01
[dev] improve UFD vs HDD/SSD detection
* If the device reports HDD or SSD in its name, take it into account
* Also fix ChangeLog
2020-04-16 17:33:08 +01:00
Pete Batard 11633a318a
[internal] update ChangeLog for BETA
* Also add an extra device to the list of internally unlisted
2020-04-15 16:59:01 +01:00
Pete Batard 2442aaf76f
[dev] improve FIXED vs REMOVABLE detection for drives with unmounted partitions
* And add an exception for a reported flash drive
* Also fix a couple warnings in msapi_utf8.h and net.c
2020-04-10 13:16:57 +01:00
Pete Batard 761953fdbf
[vds] enable device cycling when using VDS
* Hopefully using DICS_FLAG_CONFIGSPECIFIC instead of DICS_FLAG_GLOBAL is all that was needed
  to get device disabling/re-enabling work without creating zombie devices, because we sure
  need to force Windows' hand when it comes to detecting logical volumes...
2020-02-15 14:46:00 +00:00
Pete Batard 1b02181f74
[ui] fix percent not being displayed on slow format 2019-09-21 22:39:00 +01:00
Pete Batard 798029237f
[iso] improve fallback for dual UDF+ISO9660 images
* Also add private filtering of LM90X USB⟷SSD devices
2019-08-28 11:00:32 +01:00
Pete Batard c8fda3e4e8
[core] report SuperSpeed+ devices
* Also clean up cfgmgr32 dependencies and set rufus-next to 3.7
2019-07-31 22:45:11 +01:00
Pete Batard f95aa94c57
[core] prevent the enumeration of Windows 10 19H1 sandbox VHDs
* The new 19H1 Windows Sandbox feature relies on VHDs labelled 'PortableBaseLayer' → Don't list those
2019-07-15 12:35:22 +01:00
Pete Batard 8b18d8ce1d
[core] add CycleDevice and VDS layout refresh
* Also fix some minor issues
2019-05-23 13:09:25 +01:00
Pete Batard 5dbf537dfb
[core] add listing exception for Apple SD card readers
* Also fix a Coverity warning
2019-04-05 22:02:36 +01:00
Pete Batard 661ba7b64c
[core] fix Win7 EFI boot file extraction when dual BIOS+UEFI is in use
* Closes #1292
* Also add "RISD" (Ricoh IDE SD Card reader) to list of card readers (#551)
* Also make running Fido script read-only
2019-03-27 12:21:41 +00:00
Pete Batard 65f886141b
[fido] improve UI handling
* Center dialog on open
* Close dialog on main application exit
* Display ISO short name & size on status bar during download
* Display ISO download progress on taskbar
* Also fix improper detection of EAGET Mass Storage USB Device as HDD
2019-03-07 16:29:43 +00:00
Pete Batard 4cd308a1c0
[core] don't analyse boot records of deleted partition
* Also revert a472e96e87 as this is creating
  unwanted detection issues as per #1239. We'll try to devise a better way
  to avoid intempestive refreshes later on.
2018-11-28 11:12:54 +00:00
Pete Batard 04a5793ee7
[misc] use compilation flag to undefine NDEBUG for assert 2018-11-21 17:45:18 +00:00
Pete Batard b8c0e7b095 [dev] add exception for Prolific SD/TF Card Reader
* Closes #1221
2018-10-04 12:24:08 +02:00
Pete Batard a472e96e87 [misc] prevent unwanted device refreshes 2018-09-03 13:04:05 +01:00
Pete Batard 71578459d7 [loc] fix spaces before full stops
* Also: "Asserts, it's not just for debug any more!"
2018-07-31 20:47:24 +01:00
Pete Batard 7c142fadbc [net] improve handling of invalid signatures
* Also make bPromptOnError an actual parameter to the download function calls
* Also prefer the use of assert() to custom assertion messages
2018-06-30 22:45:15 +01:00
Pete Batard 5ab67c03d6 [core] improve write retry handling
* Add a proper delay before retrying a write operation and increase retry count to 4
* Add retries when clearing boot records or when zeroing a drive
* Also improve log output from USB device reset
2018-06-13 19:23:24 +01:00
Pete Batard c7cd7e4a71 [misc] update log messages to reflect the new UI
* Also fix a typo in the English translation base
2018-05-19 13:01:35 +01:00
Pete Batard 8453c8c44f [ui] try to reselect the last file system explicitly set
* Also remove an duplicate internal call to IDC_FILE_SYSTEM
* Also fix the hash button mention in the Japanese translation
2018-05-06 22:31:42 +01:00
Pete Batard a44518355f [ui] UI redesign
* Better guide the user through the flow of operations
* Also follow a concept design by Fahad Al-Riyami
* Closes #117
2018-03-22 23:14:21 +00:00
Pete Batard 95db209b04 [usb] fix default listing for Elecom card reader
* Closes #1083
2018-02-14 20:35:11 +00:00
Pete Batard 903ac993f2 [misc] remove no longer needed XP workarounds 2017-11-13 14:30:25 +00:00
Pete Batard 8286a0f63a [core] add a cheat mode to reset the current USB device (cycle port)
* Will not work on Vista, Windows 7 or Server 2008
* Also update Windows version info
2017-09-15 13:56:01 +01:00
Pete Batard 5348591729 [core] add support for more non-USB card readers
* Closes #998
2017-08-13 21:03:01 +01:00
Pete Batard 3a150ddeda [core] add support for more non-USB card readers
* Closes #994
2017-08-11 11:43:37 +01:00
Pete Batard 90dc847e24 [misc] add static_strcat & static_strcpy and use static_ calls wherever possible
* Also set Rufus next to 2.17 and fix a warning
2017-08-10 19:43:52 +01:00
Pete Batard 23390bf911 [core] relax the FILE_SHARE_WRITE rules during enumeration
* Should allow enumeration of drives, that other process have open
  with RW access, back again (looking at you, Paragon!!!)
2017-05-02 00:56:07 +01:00
Pete Batard 55b7d5c2da [misc] code cleanup
* Also fix WDK compilation issues
2017-04-25 20:25:50 +01:00
Pete Batard 21ce17302d [misc] fix coverity and VS analysis warnings 2017-03-08 21:22:24 +01:00
Pete Batard c021b7bfd8 [core] fix Microsoft's inconsistent casing for device IDs
* Microsoft inconsistently lists similar Device IDs with either upper or
  lower case values. e.g. USB\VID_1908&PID_0226\5&23CE17BD&0&3 vs.
  USB\VID_1908&PID_0226\5&23ce17bd&0&3
* Of course this creates issues when using a case sensitive hash table...
* We now convert all Device IDs to uppercase before hashing them.
2017-02-20 12:26:06 +00:00
Pete Batard 54004f7f6c [enum] fix default listing for Toshiba TransMemory UFDs 2017-01-31 11:37:25 +00:00
Pete Batard 9f1f164aff [dev] adjust score for Alcor based UFDs
* Closes #888
2017-01-17 12:04:18 +00:00
Pete Batard fd093127d2 [enum] add workaround for the lousy ASMedia USB 3.0 stack
* This occurs on Windows 7 with the ASMedia proprietary USB 3.0
  controller drivers.
2017-01-12 11:47:28 +00:00
Pete Batard 5170706695 [misc] fix coverity warnings 2017-01-04 18:07:58 +00:00
Pete Batard 7d302d340f [togo] enable selection of Windows version
* Closes #847
* Also set rufus-next to 2.12
2016-12-13 14:26:27 +00:00
Pete Batard 5113be0a39 [iso] add dumping of ISOs from optical media (Alt-O) 2016-12-06 11:47:19 +00:00
Pete Batard f31a90bba2 [enum] add support for O2Micro PCI-E card readers
* Part of #767
2016-06-06 00:36:56 +01:00
Pete Batard 66534640a4 [enum] use Unicode when retrieving the device friendly name
* This should fix the improper display of some localized strings such as
  "Microsoft Virtual Disk"
2016-06-05 20:21:16 +01:00