Wrong TC instance using tcmatch.dll

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Wrong TC instance using tcmatch.dll

Post by *DrShark »

To reproduce:
1) configure your main TC to use tcmatch.dll plugin (update: to reproduce the issue tcmatch.dll cannot be in TC folder. Put it to some custom path and in main wincmd.ini write it in tcmatch parameter of [Configuration] section); restart main TC.
2) launch second TC instance with /I switch pointing to fresh configuration file, like /I=%tmp%\fresh.ini
3) use Ctrl+S in second TC instance and insert letters in filter: as expected, tcmatch is not loaded (I'm using QuickSearch Extended tcmatch plugin in main TC instance and it shows own addititional bar near QuickSearch input field if loaded).
4) now press Ctrl+S in main TC instance, insert letters in Quick search -> tcmatch.dll is loaded there (I see mentioned additional bar of QSX).
5) switch to second TC instancce, refresh panel, press Ctrl+S again, insert letters: tcmatch from first instance is used (I see mentioned additional bar of QSX).
Note: to be sure tcmatch is not used in step 3, before doing it I unchecked "Beginning" option in second TC instance to make use TC's filter the same way I use QSX.
Last edited by DrShark on 2017-03-21, 11:29 UTC, edited 1 time in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Doesn't TC use tcmatch.dll in its dir by default? So wrong usage may be only if you use renamed tcmatch.dll and set path to it in wincmd.ini...
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

MVV wrote:Doesn't TC use tcmatch.dll in its dir by default? So wrong usage may be only if you use renamed tcmatch.dll and set path to it in wincmd.ini...
Yes, this is important moment: my TC folder doesn't have tcmatch.dll, in my main TC instance I use custom (different) path for tcmatch.dll set in wincmd.ini.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, I don't understand the problem. Why isn't tcmatch loaded in step 3? Because it's not in the TC directory? Does it work when you copy it there?
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler(Author),
He uses tcmatch that has other location than %COMMANDER_PATH%\tcmatch.dll, so it shouldn't be loaded when its path is not set in wincmd.ini (as it is with clean INI in step 3; but it is somehow loaded anyway in step 5).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC calls LoadLibraryExW with the passed file name - which is %COMMANDER_PATH%\tcmatch.dll by default, or the value from the wincmd.ini if present. Env vars are replaced by their true paths. I don't see any reasons why this could go wrong, sorry.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ghisler(Author) wrote:I don't see any reasons why this could go wrong, sorry.
I'll try to make a video.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

2ghisler(Author)
I've sent a link to the video to support email.
Mail subject:
tcmatch.dll loading in wrong TC instance
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

2ghisler(Author)
In email to me you wrote:
Christian Ghisler wrote:It could be tcmatch itself - normally tcmatch cannot replace or extend the
quick search dialog. I guess that once this tcmatch dll is loaded, it tries
to replace the dialog in all running copies of Total Commander. Then it's
not possible to have once copy with and one without tcmatch.
I can confirm it, indeed as a plugin QSX isn't seem to be loaded in the TC instance that doen't have tcmatch entry and the dll isn't in %commander_path%, but if other TC instance does use QSX and it loaded by user with Ctrl+S at last once, its panel appears in all TC instances where user use Ctrl+S. (upd: added report in QSX support topic).

Also you may ignore my email where I asked about help with PinYin tcmatch plugin (this one), there is a good example in this post. This PinYin tcmatch plugin did help me to figure out where exactly the problem.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply