[WFX] VirtualPanel: Temporary panel for TC

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
nellossie
Junior Member
Junior Member
Posts: 6
Joined: 2019-04-25, 17:23 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *nellossie »

THANKS A LOT FOR YOUR PATIENCE...

However you will have to reload database manually in other TC instances which get updated database from Dropbox (I've said about this in my previous post).
AH, NOW I UNDERSTAND, UPDATING & REFRESHING ARE 2 DIFFERENT ACTIONS

If you afraid that auto-merging may damage your database, you can try disabling new database format in settings: new format takes less space but old one is 100% safe to line insertions or deletions because every line contains full virtual path.
GREAT TIP, THANKS

BTW you can configure most settings via GUI configuration dialog by opening Virtual Panel's properties within TC, or by using <config command from TC command line.
SORRY BUT I CAN'T FIGURE OUT HOW TO DO EITHER OF THOSE THINGS - COULDN'T FIND VP IN TC'S OPTIONS MENU, AND RUNNING <config FROM THE TC COMMAND LINE OPENED A WINDOW THAT IMMEDIATELY CLOSED...

I ALSO HAVE A DIFFERENT QUESTION. WOULD IT BE POSSIBLE TO HAVE 2 DIFFERENT INSTANCES OF VPANEL, EACH POINTING TO A DIFFERENT DATABASE (.LST FILE)?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

You have to open Virtual Panel's properties, not TC options menu. Go to Network Neighborhood and do a right click on Virtual Panel plugin entry, then click Properties.

You have to execute VP commands from a VP folder/tab, it will not work from non-VP folder/tab.

You can copy VP installation folder and install it into TC as another plugin, you can have any number of VP instances.
nellossie
Junior Member
Junior Member
Posts: 6
Joined: 2019-04-25, 17:23 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *nellossie »

Thanks so much for these further explanations.

I copied my existing installation folder, changing the folder name to VirtualPanel2 and the name of the plugin itself to VirtualPanel2.wfx64
Also I added a second entry in wincmd.ini as follows:
[FileSystemPlugins]
VirtualPanel=C:\Program Files (x86)\totalcmd\wfx\VirtualPanel\VirtualPanel.wfx64
VirtualPanel2=C:\Program Files (x86)\totalcmd\wfx\VirtualPanel2\VirtualPanel2.wfx64

This worked! I also see "VirtualPanel2" in Network Neighborhood.

However, I want to use a different database (.lst) file for the second instance, and here I was unsuccessful.
Adding a second set of definitions to fsplugin.ini, under [Virtual Panel2], had no effect.
Similarly, making changes by running <config from VirtualPanel2 changed the parameters for both instances.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

You have to use separate configuration file for every Virtual Panel instance, so you need to create VirtualPanel.ini in first VP dir and VirtualPanel2.ini in second one, so these VP instances will load this file instead of standard TC configuration file. Readme contains more details.
nellossie
Junior Member
Junior Member
Posts: 6
Joined: 2019-04-25, 17:23 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *nellossie »

Thanks a lot, it works perfectly :)
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *DrShark »

I got another crash similar to this one when trying to access VirtualPanel, now in portable TC stored on my USB stick which I didn't use for a long time. It was first time I tried to access VP in that session, and it's possible it was 1st time ever I tried to access it on this USB stick. After pressing Yes in TC's error message, TC and VP worked fine. I can't reproduce a crash anymore.

After analyzing stack trace,
Christian Ghisler wrote:It _seems_ to happen in LoadLibraryEx - was this your first access to
the VirtualPanel plugin after opening Total Commander?

If yes, does VirtualPanel do something in dll_process_attach like
trying to load other dlls? Microsoft explicity warns not to do that
in the dll load function.
I think the question about plugin actions during in dll_process_attach is a question to a plugin author, so I'm posting it here.
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

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

Well, I don't think that I do any scary things in DllMain, perhaps the most interesting ones are loading WCMICONS.dll (but it shouldn't cause any troubles because it doesn't have any code and dependencies) and getting VP DLL version, but these actions are done every time so I believe problems would be noticed earlier...
Please let me know if such a crash will happen again or if you get a way to reproduce it.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *ghisler(Author) »

You should never call LoadLibrary from DllMain! The reason is that DllMain is called while inside LoadLibrary, and LoadLibrary isn't reentrant.

Try moving the loading of wcmicons.dll out of dllmain. This can and will cause problems. See:
https://stackoverflow.com/questions/4370812/calling-loadlibrary-from-dllmain

Just put something like
iconsLoaded=false;
in dllmain, and when you later need it, call
if (!iconsLoaded) {
LoadLibrary...
iconsLoaded=true;
}
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

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

As I understand, LoadLibrary is not reentrant only for single module, and it can only cause problems if you call functions of libraries that are not finished their initialization yet or load libraries that try to load your library within DllMain, but it should be safe to load a resource library (there will be no dependency loops).

And, it is the only report for 8 years, so I suppose that the exception was caused by some other thing...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

zxc,
I've received your email message but couldn't send a reply because my mail server detected it as a spam (that's funny though). I'll reply here.
OS: Windows 7 enterprise edition service pack 1
Total Commander : Version 9.22a
VirtualPanel : version 2.0.7.1372 (download from
http://totalcmd.net/plugring/virtualpanel.html)
Issue: VirtualPannel lost data after reboot the pc.

I search web and this forum, but not found any similar issues.
Can you give me some tips?
Please check VP settings, default state file location is %TEMP%, perhaps you clear it every day.
You should set state file location to some persistent writable place. Refer to Readme for details.
zxy
Junior Member
Junior Member
Posts: 3
Joined: 2019-06-20, 02:58 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *zxy »

@MVV, Thank's for your paitent reply.
Another Question: How to get the physical path from the VP?
I want to TC user command (in usercmd.ini) to deal with the physical path of the VP.
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

You can use standard %P%N placeholder for inserting physical file path into button/usercommand parameter. But TC doesn't allow to pass physical paths of directories, and also it doesn't allow to pass list of physical paths.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *Usher »

MVV wrote: 2019-06-25, 13:19 UTC You can use standard %P%N placeholder for inserting physical file path into button/usercommand parameter. But TC doesn't allow to pass physical paths of directories, and also it doesn't allow to pass list of physical paths.
What will TC pass if you stand on [..] a.k.a. up-dir?
Andrzej P. Wozniak
Polish subforum moderator
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *MVV »

Try it, I think TC will warn that you are cheater. :)

Well, just tried, it passes virtual path.
zxy
Junior Member
Junior Member
Posts: 3
Joined: 2019-06-20, 02:58 UTC

Re: [WFX] VirtualPanel: Temporary panel for TC

Post by *zxy »

How can I get the physical path corresponding to the selected VirtualPath?
Post Reply