repro:
-------
1. format any external hdd or usb key using rightclick on the drive button
2. the windows format dialog pops up
3. start format with desired settings
4. close tc
5. formatting window is killed with tc
suggest:
----------
when format is in progress ask if tc should terminate and kill format or not
alternative
call the system format dialog in a seperate process that survives tc program termination
TC 7.50a terminates Formatting of device when closed
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Unfortunately formatting is part of the system, not Total Commander itself. Total Commander isn't informed by the system when a window opened by the context menu is closed. 

Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
thank you for the quick response 
i see the problem tc has - two things come to mind:
#1 attach format api call to separate process
#2 on format api call - trigger scan for format api window - when closing tc check for format window still beeing present (you could also hook to the window close event)
i would not suggest this if my latest experience of formatting a newly bought 1.5 tb hard drive had not abruptly ended at approx. 90% (after some hours of formatting) - my face must have been price winning

i see the problem tc has - two things come to mind:
#1 attach format api call to separate process
#2 on format api call - trigger scan for format api window - when closing tc check for format window still beeing present (you could also hook to the window close event)
i would not suggest this if my latest experience of formatting a newly bought 1.5 tb hard drive had not abruptly ended at approx. 90% (after some hours of formatting) - my face must have been price winning

As I see, when I open format dialog or properties window, or use Ctrl+C/Ctrl+V, new thread adds, with start address SHLWAPI.dll!Ordinal505+0x37A. I think, TC may check on exit if some threads with this start address exist and ask user to kill them (or any threads started in SHLWAPI.dll if in different Windows versons this function is different).
- ghisler(Author)
- Site Admin
- Posts: 50386
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Hmm, that start address is probably platfrom specific. How to get it anyway? NtQueryInformationThread?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I hadn't found another way to get it. So if you will call this function at run-time, it should work for Windows XP and later i.e. in most OS's.ghisler(Author) wrote:Hmm, that start address is probably platfrom specific. How to get it anyway? NtQueryInformationThread?
I think that for all Windows versions start address for such thread will be always in SHLWAPI.dll - so if you get its instance and image size, you may check if address in this module.