Page 1 of 2

Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 06:08 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 09:56 UTC
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

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 10:07 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 11:06 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 11:31 UTC
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 😂😂😂

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 11:49 UTC
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! 🤣

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 12:47 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 13:33 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 14:11 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 14:54 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 15:11 UTC
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 :)

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-13, 22:21 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-14, 14:08 UTC
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).

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-14, 14:15 UTC
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.

Re: Strange interaction among Double Commander and Total Commander

Posted: 2023-04-26, 10:19 UTC
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?