This forum uses cookies. Click X button to hide this message. What is stored? / Privacy
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) Printable version
View previous topic :: View next topic  
Author Message
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8022
Location: Russian Federation

PostPosted: Tue Jun 14, 2016 1:42 am    Post subject: [WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper Reply with quote

Wcx6432 allows using 32-bit WCX plugins in 64-bit TC.

Wcx6432 Beta 240


Installation:

1. Extract to any directory.
2. Put file Wcx6432.ini to TC directory and fix paths to wrapper files in it.
3. Copy Wcx6432.wcx64 to desired 32-bit WCX plugin folders and rename to match plugin file names (e.g. in case of MSI-Plus.wcx plugin loader should be renamed to MSI-Plus.wcx64).


How does it work:

TC loads small loader Wcx6432.wcx64 which reads Wcx6432.ini and loads Wcx6432 client (Wcx6432c.dll), then client starts Wcx6432 server (Wcx6432s.exe) and establishes connection with it. Server loads 32-bit plugin and calls its functions when TC calls these functions from wrapper. So only the small loader have to be copied to multiple places, the rest files are in the only location and may be easilly updated.

It is currently in beta state, not all functions are supported.
Most functions are supported. The only unsupported ones are memory-packing functions.
Perhaps some functions/callbacks may not work properly because I couldn't tested them with my test plugins.


Technical details regarding supported functions:

Loader exports all WCX interface functions and this causes a side effect: TC thinks that plugin supports everything. E.g. it calls only unicode and extended function versions (ReadHeaderExW instead of ReadHeaderEx or ReadHeader). Therefore such function calls are translated to calls of functions that plugin really supports, otherwise default value or errors returned.

Following functions are wrapped:
PackSetDefaultParams
PkSetCryptCallback
SetChangeVolProcW
SetChangeVolProc
SetProcessDataProcW
SetProcessDataProc
OpenArchiveW
OpenArchive
ReadHeaderExW
ReadHeaderEx
ReadHeader
ProcessFileW
ProcessFile
CloseArchive
PackFilesW
PackFiles
DeleteFilesW
DeleteFiles
GetPackerCaps
GetBackgroundFlags
ConfigurePacker
CanYouHandleThisFileW
CanYouHandleThisFile

Following functions are not wrapped yet:
StartMemPackW
StartMemPack
PackToMem
DoneMemPack

In order to test all functions I need test plugin set with plugins that export all functions. Currently I'm using:
1. MSI-Plus (non-unicode, exports ReadHeader, calls cbProcessDataProc every 1024 bytes).
2. Total7zip (unicode, exports ReadHeaderExW, unpacks in CloseArchive so calls cbProcessDataProc with negative values, supports background packing/unpacking, has options dialog).
N. I think DiskDirExtended should be added to the set (non-unicode, exports ReadHeaderEx).

I'm not aware of plugins that export PkSetCryptCallback function.
Also I'm not aware of plugins that really call SetChangeVolProc callback.
And I need a plugin example that uses memory packing.

_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…


Last edited by MVV on Tue Jan 09, 2018 1:11 am; edited 20 times in total
Back to top
View user's profile Send private message Send e-mail
deus-ex
Power Member
Power Member


Joined: 10 Feb 2003
Posts: 694
Location: Earth

PostPosted: Tue Jun 14, 2016 2:46 am    Post subject: Reply with quote

Is there any reliable way to check whether a plugin supports the functions you mention? If so, I could assist checking available plugins for these and report any matches to support your research.
_________________
Best regards
deus-ex
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8022
Location: Russian Federation

PostPosted: Tue Jun 14, 2016 2:52 am    Post subject: Reply with quote

I think that PkSetCryptCallback function should only be exported by plugins that really use it since this function is not required. So PE viewer should help here, also just searching for PkSetCryptCallback string may help.

Memory packing functions (StartMemPackW, StartMemPack, PackToMem, DoneMemPack) should also be only exported by plugins that really use it.

SetChangeVolProc function is required so most plugins only export it but ignore its calls. So we need some plugin that supports multi-volume packing... But I don't know how to check reliably that plugin really uses it. Perhaps we can just take some plugin sources and add support for this function for tests.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
deus-ex
Power Member
Power Member


Joined: 10 Feb 2003
Posts: 694
Location: Earth

PostPosted: Tue Jun 14, 2016 3:35 am    Post subject: Reply with quote

MVV wrote:
I think that PkSetCryptCallback function should only be exported by plugins that really use it since this function is not required. So PE viewer should help here, also just searching for PkSetCryptCallback string may help.

Found a few candidates that possibly(*) support PkSetCryptCallback:
* = referring to the plugin feature description

· http://www.kryptel.com/articles/total_commander.php
· http://totalcmd.net/plugring/kryptel.html
· http://ghisler.fileburst.com/fsplugins/ado.zip
· http://totalcmd.net/plugring/ZPAQ.html
· http://totalcmd.net/plugring/totalsqx.html
· http://totalcmd.net/plugring/PUZZLE.html
· http://totalcmd.net/plugring/darkcrypttc.html
· http://totalcmd.net/plugring/wcx_aes.html
· http://totalcmd.net/plugring/7Zip.html
· http://totalcmd.net/plugring/7zip_plugin.html
· http://totalcmd.net/plugring/rarfh.html
· http://totalcmd.net/plugring/new_unalz_wcx.html
· http://totalcmd.net/plugring/unalz_wcx.html
· http://totalcmd.net/plugring/redjpeg.html
· http://totalcmd.net/plugring/stegotc.html
· http://totalcmd.net/plugring/stegotc2.html

Quote:
SetChangeVolProc function is required so most plugins only export it but ignore its calls. So we need some plugin that supports multi-volume packing...

This plugin supports multi-volume archive creation (no encryption):

· http://totalcmd.net/plugring/zar.html
_________________
Best regards
deus-ex
Back to top
View user's profile Send private message Send e-mail
TW
Senior Member
Senior Member


Joined: 19 Jan 2005
Posts: 327

PostPosted: Tue Jun 14, 2016 4:44 am    Post subject: Reply with quote

i'm definitely interested in this. Smile

if only the download wouls work. not even in IE it does, sadly.

thanks a lot... once more.
_________________
licenced and happy TC user since 1994 (#11xx)
Back to top
View user's profile Send private message
deus-ex
Power Member
Power Member


Joined: 10 Feb 2003
Posts: 694
Location: Earth

PostPosted: Tue Jun 14, 2016 5:05 am    Post subject: Reply with quote

Try this alternate download host for Wcx6432_100.cab: http://ge.tt/6S5BTQb2
_________________
Best regards
deus-ex
Back to top
View user's profile Send private message Send e-mail
TW
Senior Member
Senior Member


Joined: 19 Jan 2005
Posts: 327

PostPosted: Tue Jun 14, 2016 5:09 am    Post subject: Reply with quote

ah, that works better, thanks. never had problems at yadi.sk before.

here's another mirror: http://vicebuilds6.bplaced.net/Wcx6432_100.cab

now let's do some tests.
_________________
licenced and happy TC user since 1994 (#11xx)
Back to top
View user's profile Send private message
deus-ex
Power Member
Power Member


Joined: 10 Feb 2003
Posts: 694
Location: Earth

PostPosted: Tue Jun 14, 2016 5:17 am    Post subject: Re: [WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper Reply with quote

MVV wrote:
Wcx6432 allows using 32-bit WCX plugins in 64-bit TC.

Wcx6432 Beta 100

Hi MVV,

you are wrapping 32-bit plugins to 64-bit, so I'd rather expect the order of the figures the other way arround. For example something like Wcx32to64host, I think this explains the purpose of your plugin more clearly.

I tested your wrapper and observed the following. Currently the wrapper seems only to be able to support one plugin at run time. For example, I have copied & setup the wrapper for MSI-Plus.wcx and CHMDir.wcx. When entering into an MSI-file, I cannot enter into an CHM-file during the same TC session. I have to restart TC to be able to enter into an CHM-file, and then I cannot enter into an MSI-file anymore until I restart TC.

Also I setup the wrapper for GAUP_Pro.wcx. The wrapper does not seem to be working with this plugin. For example trying to enter into a DOOM WAD-file does not do anything.


Slightly improved installation procedure:

1. Extract Wcx6432 Beta 100 to any directory (e.g. %commander_path%\wcx\wcx6432\)
2. Copy wcx6432.ini into TC's main folder and adjust the paths accordingly.

wcx6432.ini
Code:
[Wcx6432]
Client=%COMMANDER_PATH%\wcx\wcx6432\wcx6432c.dll
Server=%COMMANDER_PATH%\wcx\wcx6432\wcx6432s.exe


3. Copy wcx6432.wcx64 into the desired 32-bit WCX plugin folder.
4. Rename the copied wcx6432.wcx64 to match the filename of the 32-bit plugin.

    For example for MSI-Plus.wcx: rename wcx6432.wcx64 to msi-plus.wcx64.


[EDIT:] Added first test review, added suggestion for improved installation procedure, fixed grammar
_________________
Best regards
deus-ex


Last edited by deus-ex on Tue Jun 14, 2016 10:00 am; edited 5 times in total
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8022
Location: Russian Federation

PostPosted: Tue Jun 14, 2016 6:17 am    Post subject: Re: [WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper Reply with quote

I've just realized that shared client DLL may not work now (because initializer will be executed only once), so you may need to use separate copies of Wcx6432c.dll together with separate Wcx6432.wcx64.ini files near each loader to make it working... until I fix it or get rid of loader. Sad

deus-ex wrote:
you are wrapping 32-bit plugins to 64-bit, so I'd rather expect the order of the figures the other way arround. For example something like Wcx32to64host, I think this explains the purpose of your plugin more clearly.

Actually 6432 is because of the Windows thing: Wow6432Node is for 32-bit soft under 64-bit system. Very Happy

And thank you for list of plugins, I'll try them.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
deus-ex
Power Member
Power Member


Joined: 10 Feb 2003
Posts: 694
Location: Earth

PostPosted: Tue Jun 14, 2016 6:24 am    Post subject: Reply with quote

Hi MVV,

I was just editing my previous post when you added a reply. Please check my previous post for added information.
_________________
Best regards
deus-ex
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8022
Location: Russian Federation

PostPosted: Tue Jun 14, 2016 6:28 am    Post subject: Reply with quote

I've just answered your question regarding multiple instances... and added extra installation step to first post (hidden feature may help here).
Unfortunately I will need to merge Wcx6432.wcx64 with Wcx6432c.dll.
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…


Last edited by MVV on Tue Jun 14, 2016 6:31 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
deus-ex
Power Member
Power Member


Joined: 10 Feb 2003
Posts: 694
Location: Earth

PostPosted: Tue Jun 14, 2016 6:31 am    Post subject: Reply with quote

Yes, I just saw you did the same, i.e. you edited your post while I posted an reply.

Is the installation step no. 2 still required, after you updated the installation process (red text)?
_________________
Best regards
deus-ex
Back to top
View user's profile Send private message Send e-mail
MVV
Power Member
Power Member


Joined: 03 Aug 2008
Posts: 8022
Location: Russian Federation

PostPosted: Tue Jun 14, 2016 6:36 am    Post subject: Reply with quote

You will still need an INI for the client module so it is required (otherwise you will need to create separate INI files for every client module too).
_________________
TCFS2 + TCFS2Tools: Full-screen mode for TC etc (forum)
TOTALCMD.NET: AskParam, CopyTree, NTLinks, Sudo, VirtualPanel…
Back to top
View user's profile Send private message Send e-mail
deus-ex
Power Member
Power Member


Joined: 10 Feb 2003
Posts: 694
Location: Earth

PostPosted: Tue Jun 14, 2016 6:46 am    Post subject: Reply with quote

Ok, understood. If you find the time, can you please check why the GAUP plugin does not work with your wrapper? It does work with the wrapper decTC32HostSetup by Dec.
_________________
Best regards
deus-ex
Back to top
View user's profile Send private message Send e-mail
TW
Senior Member
Senior Member


Joined: 19 Jan 2005
Posts: 327

PostPosted: Tue Jun 14, 2016 8:36 am    Post subject: Reply with quote

it seems i'm too stupid to get it running for more than 1 plugin. Confused
as soon as i use one, the next one doesn't work.

what i did:

- copy Wcx6432.ini to TC main dir, edited paths to:


Quote:
[Wcx6432]
Client=%COMMANDER_PATH%\PLUGINS\WCX\Wcx6432\Wcx6432c.dll
Server=%COMMANDER_PATH%\PLUGINS\WCX\Wcx6432\Wcx6432s.exe


- copy the other files to the plugin dir, it looks like this:

Quote:
msi-plus.wcx64.ini
Wcx6432c.dll
msi-plus.wcx64
msi-plus.wcx


the msi-plus.wcx64.ini contains:

Quote:
[Wcx6432]
Client=%COMMANDER_PATH%\PLUGINS\WCX\msi\Wcx6432c.dll
Server=%COMMANDER_PATH%\PLUGINS\WCX\Wcx6432\Wcx6432s.exe


what's wrong with my ini files?
_________________
licenced and happy TC user since 1994 (#11xx)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> Plugins and addons: devel.+support (English) All times are GMT - 6 Hours
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Imprint/Impressum: This site is maintained by Ghisler Software GmbH
Privacy Policy | Datenschutzerklärung | Politique de Confidentialité

Using phpBB © phpBB Group