Plugin interface descriptions for TC 7.5 (beta)
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Plugin interface descriptions for TC 7.5 (beta)
Packer plugins:
https://plugins.ghisler.com/beta/wcx_ref2.20.zip
Lister plugins:
https://plugins.ghisler.com/beta/listplughelp2.0.zip
File system plugins:
https://plugins.ghisler.com/beta/fspluginhelp2.0.zip
Content plugins:
https://plugins.ghisler.com/beta/contentpluginhelp20.zip
Sample "fsplugin" to which the help files refer to:
https://plugins.ghisler.com/beta/fsplugin.zip
https://plugins.ghisler.com/beta/wcx_ref2.20.zip
Lister plugins:
https://plugins.ghisler.com/beta/listplughelp2.0.zip
File system plugins:
https://plugins.ghisler.com/beta/fspluginhelp2.0.zip
Content plugins:
https://plugins.ghisler.com/beta/contentpluginhelp20.zip
Sample "fsplugin" to which the help files refer to:
https://plugins.ghisler.com/beta/fsplugin.zip
Last edited by ghisler(Author) on 2010-03-26, 10:18 UTC, edited 1 time in total.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
About Unicode support: It is said in the interface description
In contentplugin.HLP -> contplug.h there is still the old version number in the comment
However, cunicode.cpp includes fsplugin.h which is normally not used for WCX, WDX or WLX. So, should all plugin types use fsplugin.h?Add the files cunicode.h and cunicode.cpp to your project.
In contentplugin.HLP -> contplug.h there is still the old version number in the comment
// Contents of file contplug.h version 1.5
TC plugins: Autodesk 3ds Max / Inventor / Revit Preview, FileInDir, ImageMetaData (JPG Comment/EXIF/IPTC/XMP), MATLAB MAT-file Viewer, Mover, SetFolderDate, Solid Edge Preview, Zip2Zero and more
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Indeed you are right - please remove the following definitions and functions for other plugin types:
#include "fsplugin.h"
extern tProgressProc ProgressProc;
extern tLogProc LogProc;
extern tRequestProc RequestProc;
extern tProgressProcW ProgressProcW;
extern tLogProcW LogProcW;
extern tRequestProcW RequestProcW;
ProgressProcT
LogProcT
RequestProcT
#include "fsplugin.h"
extern tProgressProc ProgressProc;
extern tLogProc LogProc;
extern tRequestProc RequestProc;
extern tProgressProcW ProgressProcW;
extern tLogProcW LogProcW;
extern tRequestProcW RequestProcW;
ProgressProcT
LogProcT
RequestProcT
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
WCX Writer's Reference -> 5. Callbacks -> [face=courier]tPkCryptProc[/face]
vs.
[face=courier]wcxhead.h[/face] & [face=courier]wcxhead.pas[/face]
Unlike the other callback links, the [face=courier]tPkCryptProc[/face] goes to a function [face=courier]PkCryptProc()[/face] instead of the typedef.
This in itself is not a problem, but I found differences when compared with the source code.
In [face=courier]wcxhead.h[/face] the typedef [face=courier]tPkCryptProc[/face] has an additional [face=courier]int PluginNr[/face] as the first parameter:
In [face=courier]wcxhead.pas[/face] the type has a different name, but at least the parameters are the same as the help-file:
Except the name of one parameter is different in the help-file: [face=courier]CryptoNumber[/face] vs. [face=courier]CryptoNr[/face].
vs.
[face=courier]wcxhead.h[/face] & [face=courier]wcxhead.pas[/face]
Unlike the other callback links, the [face=courier]tPkCryptProc[/face] goes to a function [face=courier]PkCryptProc()[/face] instead of the typedef.
This in itself is not a problem, but I found differences when compared with the source code.
In [face=courier]wcxhead.h[/face] the typedef [face=courier]tPkCryptProc[/face] has an additional [face=courier]int PluginNr[/face] as the first parameter:
Code: Select all
//wcxhead.h
typedef int (__stdcall *tPkCryptProc)(int PluginNr,int CryptoNr,int Mode,
char* ArchiveName,char* Password,int maxlen);
Code: Select all
{wcxhead.pas}
TPkPluginCryptProc=function(CryptoNr:integer;mode:integer;ArchiveName,
Password:pchar;maxlen:integer):integer; stdcall;
aNDreas Bolotă
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Thanks, I have just corrected the C documentation. There is indeed no PluginNr parameter for packer plugins.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
The Unicode typedef [face=courier]tPkCryptProcW[/face] still has the extra [face=courier]PluginNr[/face] parameter.ghisler(Author) wrote:Thanks, I have just corrected the C documentation. There is indeed no PluginNr parameter for packer plugins.
------------------------------------------
An additional thing I found is in the documentation of callback function [face=courier]PkCryptProc()[/face]: the return value mentions the constant [face=courier]FS_FILE_OK[/face] for "Success" which is not part of the documented Error codes (where directly the value "0" is given for this purpose). Since that constant is also missing from the source code files, I assume it's coming from the "fsplugin" sample?
------------------------------------------
Like with v2.12, I have made a conversion of the WCX Writer's Reference v2.20 documentation to CHM, which can be found here: http://geocities.com/kirnbie/wcx_knd/
aNDreas Bolotă
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
The truth always carries the ambiguity of the words used to express it. (Frank Herbert, God Emperor of Dune)
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
OK, I will add the following explanation:
Note: You need to return the type ft_stringw instead of ft_string for Unicode content in ContentGetValueW. This allows you to return either ANSI or Unicode content.
Note: You need to return the type ft_stringw instead of ft_string for Unicode content in ContentGetValueW. This allows you to return either ANSI or Unicode content.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Dear Christian!
I'd like to draw your attention that you use PChar for the parameters of the Ansi functions in fsplugin.pas, but PChar means PWideChar starting from Delphi 2009 so the types won't match. It would be better to use PAnsiChar there.
Best regards
Nyíri László from Hungary
I'd like to draw your attention that you use PChar for the parameters of the Ansi functions in fsplugin.pas, but PChar means PWideChar starting from Delphi 2009 so the types won't match. It would be better to use PAnsiChar there.
Best regards
Nyíri László from Hungary
Plugins: RamCopy, Transformer Framework
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Sorry, I do not have Delphi 2009, so I didn't know about that. Isn't it a compiler switch?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com