New interface documentation for TC7 plugins
Moderators: Hacker, petermad, Stefan2, white
- Motorocker
- Member
- Posts: 105
- Joined: 2006-07-19, 10:52 UTC
- Location: Perm, Russia
- Contact:
- ghisler(Author)
- Site Admin
- Posts: 50532
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
You need to export it, but you can always return NULL so TC goes on to the next plugin.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Hi. In tHeaderDataEx section of Packer interface, the structure should be called [face=courier]tHeaderDataEx[/face], not [face=courier]tHeaderData[/face]. This new structure should also be listed in the contents page of hlp file under "4. Structures".
In wcxhead.h (both in hlp and zip file):
should be
In wcxhead.h (both in hlp and zip file):
Code: Select all
{Errors returned by PackToMem}
Code: Select all
/* Errors returned by PackToMem */
- 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:
I have now updated the interface descriptions for packer, content and file system plugins. The files can be downloaded from the URLs in the first post of this thread.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
I have some misunderstand of wdx-plugins documentation. In ContentGetDetectString function description i see following remarks:
. I assume, that such operands really unuseful in wdx plugins, and these descriptions have simply remained after copying from the wlx-plugin documentation.
I would like explanations if it not so, or, otherwise, documentation corrections.
And description of FORCE and MULTIMEDIA operands have surprised meThe syntax of the detection string is as follows. There are operands, operators and functions.
Operands:
EXT The extension of the file to be loaded (always uppercase).
SIZE The size of the file to be loaded.
FORCE 1 if the user chose 'Image/Multimedia' from the menu, 0 otherwise.
MULTIMEDIA This detect string is special: It is always TRUE (also in older TC versions). If it is present in the string, this plugin overrides internal multimedia viewers in TC. If not, the internal viewers are used. Check the example below!
[5] The fifth byte in the file to be loaded. The first 8192 bytes can be checked for a match.
12345 The number 12345
"TEST" The string "TEST"

I would like explanations if it not so, or, otherwise, documentation corrections.
Mistakes in wcx_ref2.12.zip (04.01.2007) for packer plugins
I have found some mistakes in WCX Writer's Reference.hlp v2.12 with file date 04.01.2007.
First the list of help pages in the content page does not match with the page list used for the navigation buttons << and >>. The first list shows the items on the content page and the second list the used list for the navigation buttons. Red marked are those pages which are missing in the navigation list. Green marked are the pages which are in the navigation list in wrong order.
List on content page:
Page SetChangeVolProc: There is a small typo in (e.g. insterting another diskette).
Page PackToMem: The second sentence does not end with a full stop. And DoneMemPack in the second sentence could be also a link like StartMemPack. There is a typo in the current output posisition by. At last at the end of this page the last item number should be 6. and not 5.
Page DoneMemPack: error codes should be a link as in all other help pages. And the space before It may be called should be deleted.
Page PackDefaultParamStruct: The type definition DWORD and the define MAX_PATH are not defined anywhere in the help or the header files. So if a plugin writer uses for example wcxhead.h without including windows.h the compiler of Visual Studio 6 outputs the error undefined symbol. The problem is that DWORD and MAX_PATH are not explained anywhere in the MSDN too. As I developed v2.0 of the LZX plugin (available with source at the Total Commander Plugins page) I was forced to search in all include files of VS6 to get the correct type definition and value. So DWORD and MAX_PATH should be explained on this help page or the real definitions are used or in the header files the appropriate definitions are present. Following lines in wcxhead.h would solve this problem:
For the Delphi header file and its help page
DefaultIniName:array[0..MAX_PATH-1] of char;
should be edited to
DefaultIniName:array[0..259-1] of char;
I don't know what is the correct Delphi replacement for UnpSizeHigh:DWORD;
Page Header for C(++) and wcxhead.h: The Delphi brace at end of comment created with this plugin} should be deleted. But better would be to delete the complete line because a packer plugin can also search for text in archives even when the plugin has not created the archive like the LZX plugin v2.0 demonstrates.
Page Header for Delphi and wcxhead.pas: The complete line with { created with this plugin} should be deleted - see above.
And finally in both header files and the 2 help pages about the header files following typo exist (altogether 4 times): Can modify exisiting archives
First the list of help pages in the content page does not match with the page list used for the navigation buttons << and >>. The first list shows the items on the content page and the second list the used list for the navigation buttons. Red marked are those pages which are missing in the navigation list. Green marked are the pages which are in the navigation list in wrong order.
List on content page:
- Overview
- What's new
- OpenArchive
- ReadHeader
- ProcessFile
- CloseArchive
- SetChangeVolProc
- SetProcessDataProc
- PackFiles
- DeleteFiles
- GetPackerCaps
- ConfigurePacker
- StartMemPack
- PackToMem
- DoneMemPack
- CanYouHandleThisFile
- PackSetDefaultParams
- ReadHeaderEx
- tHeaderData
- tHeaderDataEx
- tOpenArchiveData
- PackDefaultParamStruct
- tProcessDataProc
- tChangeVolProc
- Error Codes
- Header for C(++)
- Header for Delphi
- Content
- Overview
- OpenArchive
- ReadHeader
- ProcessFile
- CloseArchive
- PackFiles
- DeleteFiles
- GetPackerCaps
- ConfigurePacker
- SetChangeVolProc
- SetProcessDataProc
- tHeaderData
- tOpenArchiveData
- tProcessDataProc
- tChangeVolProc
- Error Codes
- Header for C(++)
- Header for Delphi
Page SetChangeVolProc: There is a small typo in (e.g. insterting another diskette).
Page PackToMem: The second sentence does not end with a full stop. And DoneMemPack in the second sentence could be also a link like StartMemPack. There is a typo in the current output posisition by. At last at the end of this page the last item number should be 6. and not 5.
Page DoneMemPack: error codes should be a link as in all other help pages. And the space before It may be called should be deleted.
Page PackDefaultParamStruct: The type definition DWORD and the define MAX_PATH are not defined anywhere in the help or the header files. So if a plugin writer uses for example wcxhead.h without including windows.h the compiler of Visual Studio 6 outputs the error undefined symbol. The problem is that DWORD and MAX_PATH are not explained anywhere in the MSDN too. As I developed v2.0 of the LZX plugin (available with source at the Total Commander Plugins page) I was forced to search in all include files of VS6 to get the correct type definition and value. So DWORD and MAX_PATH should be explained on this help page or the real definitions are used or in the header files the appropriate definitions are present. Following lines in wcxhead.h would solve this problem:
Code: Select all
#ifndef MAX_PATH
#define MAX_PATH 260
#endif
#ifndef _DWORD_DEFINED
#define _DWORD_DEFINED
typedef unsigned long DWORD;
#endif
DefaultIniName:array[0..MAX_PATH-1] of char;
should be edited to
DefaultIniName:array[0..259-1] of char;
I don't know what is the correct Delphi replacement for UnpSizeHigh:DWORD;
Page Header for C(++) and wcxhead.h: The Delphi brace at end of comment created with this plugin} should be deleted. But better would be to delete the complete line because a packer plugin can also search for text in archives even when the plugin has not created the archive like the LZX plugin v2.0 demonstrates.
Page Header for Delphi and wcxhead.pas: The complete line with { created with this plugin} should be deleted - see above.
And finally in both header files and the 2 help pages about the header files following typo exist (altogether 4 times): Can modify exisiting archives
Regards from Austria!