[WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper
Moderators: white, Hacker, petermad, Stefan2
[WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper
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.
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.
Last edited by MVV on 2018-01-09, 07:11 UTC, edited 20 times in total.
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.
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.
Found a few candidates that possibly(*) support PkSetCryptCallback: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.
* = referring to the plugin feature description
· http://www.kryptel.com/articles/total_commander.php
· http://totalcmd.net/plugring/kryptel.html
· https://plugins.ghisler.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
This plugin supports multi-volume archive creation (no encryption):SetChangeVolProc function is required so most plugins only export it but ignore its calls. So we need some plugin that supports multi-volume packing...
· http://totalcmd.net/plugring/zar.html
Try this alternate download host for Wcx6432_100.cab: http://ge.tt/6S5BTQb2
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.
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)
Re: [WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper
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: Select all
[Wcx6432]
Client=%COMMANDER_PATH%\wcx\wcx6432\wcx6432c.dll
Server=%COMMANDER_PATH%\wcx\wcx6432\wcx6432s.exe
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
Last edited by deus-ex on 2016-06-14, 16:00 UTC, edited 5 times in total.
Re: [WCX] Wcx6432: 64-to-32 bit WCX plugin wrapper
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.
And thank you for list of plugins, I'll try them.
Actually 6432 is because of the Windows thing: Wow6432Node is for 32-bit soft under 64-bit system.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.
And thank you for list of plugins, I'll try them.
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.
Unfortunately I will need to merge Wcx6432.wcx64 with Wcx6432c.dll.
Last edited by MVV on 2016-06-14, 12:31 UTC, edited 1 time in total.
it seems i'm too stupid to get it running for more than 1 plugin.
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:
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:
- copy the other files to the plugin dir, it looks like this:[Wcx6432]
Client=%COMMANDER_PATH%\PLUGINS\WCX\Wcx6432\Wcx6432c.dll
Server=%COMMANDER_PATH%\PLUGINS\WCX\Wcx6432\Wcx6432s.exe
the msi-plus.wcx64.ini contains:msi-plus.wcx64.ini
Wcx6432c.dll
msi-plus.wcx64
msi-plus.wcx
what's wrong with my ini files?[Wcx6432]
Client=%COMMANDER_PATH%\PLUGINS\WCX\msi\Wcx6432c.dll
Server=%COMMANDER_PATH%\PLUGINS\WCX\Wcx6432\Wcx6432s.exe
licenced and happy TC user since 1994 (#11xx)