Strange interaction among Double Commander and Total Commander

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

epikarma
Junior Member
Junior Member
Posts: 2
Joined: 2023-04-13, 05:57 UTC

Strange interaction among Double Commander and Total Commander

Post by *epikarma »

I'm a Double Commander user but lately I'm testing Total Commander, USB version, and getting a strange behaviour.
I don't know if the issue is on the DC or TC side but I suspect it's on the latter.

If I open DC and then I open TC, I see a strange title in TC windows.
Instead of "Total Commander (x64) 10.52"
I get "[2] Total Commander (x64) 10.52"

I think TC believes there is another session of itself active while instead it is a DC one.
I don't know how TC searches for other sessions but clearly there's a problem in its probing.

Maybe TC searches for other command managers and it's a wanted behaviour but I haven't found a clue on the forum.
Or maybe DC mocks a TC instance and tricks TC so the issue is on the DC side... but I have to start from somewhere.
User avatar
Gral
Power Member
Power Member
Posts: 1460
Joined: 2005-01-26, 15:12 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Gral »

epikarma wrote: ↑2023-04-13, 06:08 UTC ...maybe DC mocks a TC instance and tricks TC so the issue is on the DC side...
This suspicion is true - DC uses the same Window Class for main window - TTOTAL_CMD
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Fla$her »

Rather, this is due to the need to support plugins.
In addition to the class, TC needs a filter by InternalName or OriginalFileName.
Overquoting is evil! πŸ‘Ž
epikarma
Junior Member
Junior Member
Posts: 2
Joined: 2023-04-13, 05:57 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *epikarma »

Gral wrote: ↑2023-04-13, 09:56 UTC
epikarma wrote: ↑2023-04-13, 06:08 UTC ...maybe DC mocks a TC instance and tricks TC so the issue is on the DC side...
This suspicion is true - DC uses the same Window Class for main window - TTOTAL_CMD
Sorry but I don't get it... Why does TC use the Window Class method to check if another TC instance is active?
Isn't reading the process list names faster and more effective? I know that TC process can appear in several flavours (TOTALCMD.EXE, TOTALCMD64.EXE and probably some others) but it couldn't be the real reason.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3278
Joined: 2003-05-06, 11:46 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Sir_SiLvA »

Fla$her wrote: ↑2023-04-13, 10:07 UTC Rather, this is due to the need to support plugins.
In addition to the class, TC needs a filter by InternalName or OriginalFileName.
Not true at all, SC supports TC's Plugins and still doesn't call itself ttotal_cmd πŸ˜‚πŸ˜‚πŸ˜‚
Hoecker sie sind raus!
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Fla$her »

epikarma wrote: ↑2023-04-13, 11:06 UTC and probably some others) but it couldn't be the real reason.
That's exactly the reason.
Sir_SiLvA wrote: ↑2023-04-13, 11:31 UTCNot true at all, SC supports TC's Plugins and still doesn't call itself ttotal_cmd
It doesn't prove anything. There are several file managers with a different window class that support TC plugins. But the problem is that not all of them. The author of DC in the process of debugging could encounter the fact that some plugin(s) requires this particular class.
Added: Q.E.D. One of the developers confirmed this back in 2010:
B4rr4cuda wrote:For the normal operation of the lister (and not only) plugins, DC create a fake form with the name of the TOTAL_CMD class.
Laughs best who laughs last! 🀣
Last edited by Fla$her on 2023-04-13, 13:26 UTC, edited 1 time in total.
Overquoting is evil! πŸ‘Ž
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Strange interaction among Double Commander and Total Commander

Post by *Horst.Epp »

Such collisions are rather seldom and can be ignored.
There is no real benfit using Double Commander compared to TC on a Windows system
and also running them at the same time.
With the exception of the price.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Fla$her »

Horst.Epp wrote: ↑2023-04-13, 12:47 UTCThere is no real benfit using Double Commander compared to TC on a Windows system and also running them at the same time.
To know this for sure, you need to study the capabilities of the program in detail, as, for example, was partially demonstrated in this topic.
Overquoting is evil! πŸ‘Ž
User avatar
funkymonk
Senior Member
Senior Member
Posts: 410
Joined: 2013-12-04, 09:56 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *funkymonk »

Horst.Epp wrote: ↑2023-04-13, 12:47 UTC There is no real benfit using Double Commander compared to TC on a Windows system and also running them at the same time.
This statement is just an (unsupported and generalizing) opinion and and can be ignored.
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3278
Joined: 2003-05-06, 11:46 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Sir_SiLvA »

Fla$her wrote: ↑2023-04-13, 11:49 UTC
B4rr4cuda wrote:For the normal operation of the lister (and not only) plugins, DC create a fake form with the name of the TOTAL_CMD class.
Laughs best who laughs last! 🀣
And STILL, SC doesnt need to do this....but how about you quote some other 13 year old data to have the last (pointless) word, like always....
funkymonk wrote: ↑2023-04-13, 14:11 UTC
Horst.Epp wrote: ↑2023-04-13, 12:47 UTC There is no real benfit using Double Commander compared to TC on a Windows system and also running them at the same time.
This statement is just an (unsupported and generalizing) opinion and and can be ignored.
Just because YOU dont like the TRUTH, it doesnt automatically make the facts wrong.
Hoecker sie sind raus!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Strange interaction among Double Commander and Total Commander

Post by *Horst.Epp »

2Sir_SiLvA
I like the TRUTH but your answers are not telling it, they are just funny and don't contain any info :)
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Fla$her »

Sir_SiLvA wrote: ↑2023-04-13, 14:54 UTCAnd STILL, SC doesnt need to do this....but how about you quote some other 13 year old data to have the last (pointless) word, like always....
Only your thoughtless trolling is pointless here, including ridiculing my assumption, which was later confirmed by a quote. Her age does not make the argument any less well-founded, on the contrary. The authors of other file managers warn in advance that only a part of TC plugins can work. Why you think SC is an exception is a mystery to me. Have you probably checked all plugins on it without exception? However, it doesn't matter, since it's not about him.
Overquoting is evil! πŸ‘Ž
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Strange interaction among Double Commander and Total Commander

Post by *ghisler(Author) »

Yes, I'm using the window class to find previous instances - this way I can also pass parameters to the older instance like the left and right directory (e.g. when using parameter /O).
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2244
Joined: 2020-01-18, 04:03 UTC

Re: Strange interaction among Double Commander and Total Commander

Post by *Fla$her »

2ghisler(Author)
So what about improving filtering?
Fla$her wrote: ↑2023-04-13, 10:07 UTCIn addition to the class, TC needs a filter by InternalName or OriginalFileName.
Overquoting is evil! πŸ‘Ž
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Strange interaction among Double Commander and Total Commander

Post by *ghisler(Author) »

In addition to the class, TC needs a filter by InternalName or OriginalFileName.
I don't think that this is worth the trouble.
1. There is a function GetModuleFileNameEx, but it doesn't work across the 32-bit-64-bit barrier (32-bit programs don't see 64-bit programs and vice versa).
2. There is GetProcessImageFileName and QueryFullProcessImageName, but what if the user has renamed totalcmd.exe to Explorer.exe, e.g. to support some virus scanners in the context menu which restrict themselves to Explorer?
Author of Total Commander
https://www.ghisler.com
Post Reply