New interface documentation for TC7 plugins

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

Moderators: Hacker, petermad, Stefan2, white

User avatar
Motorocker
Member
Member
Posts: 105
Joined: 2006-07-19, 10:52 UTC
Location: Perm, Russia
Contact:

Post by *Motorocker »

This WCX functions named as b) optional:, but without them plugin dont work:
SetChangeVolProc
SetProcessDataProc


Move them to
a) mandatory:
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

typo in content plug-in help:
On the ContentSendStateInformation page
contstr_showhint instead of contst_showhint
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

Lister interface:
Mandatory (must be implemented):
ListLoad
inside:
Remarks:
(...)
Lister plugins which only create thumbnail images do not need to implement this function.
Is it a mistake or do I misunderstand it?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
User avatar
TrePe
Junior Member
Junior Member
Posts: 41
Joined: 2004-02-10, 23:30 UTC
Location: Slovakia

Post by *TrePe »

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):

Code: Select all

{Errors returned by PackToMem}
should be

Code: Select all

/* Errors returned by PackToMem */
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

You are right, thanks for the corrections!
Author of Total Commander
https://www.ghisler.com
User avatar
D1P
Senior Member
Senior Member
Posts: 233
Joined: 2005-02-28, 18:29 UTC
Location: Moscow
Contact:

Post by *D1P »

Typo in wfx help: go to FsContentGetDefaultView topic and see:
ViewOptions
The two values, separated by a vertical line, mean:
- auto-adjust-width, or -1 for no adjust
- horizonal scrollbar flag
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50532
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2ghisler(Author)
typo in content plug-in help:
On the ContentSendStateInformation page
contstr_showhint instead of contst_showhint
Not fixed in the latest documentation.
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Probably the content plugin help was not updated at all. It's dated on 2006-09-15.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
D1P
Senior Member
Senior Member
Posts: 233
Joined: 2005-02-28, 18:29 UTC
Location: Moscow
Contact:

Post by *D1P »

Typo in WFX and WDX documentation found. Open ContentGetValue section, and you can see in FieldValue parameter description:
ft_boolean: FieldValue points to a 32-bit number. 0 neans false, anything else means true.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

2Ghisler
int __stdcall ListLoadNext(HWND ParentWin,HWND ListWin,char* FileToLoad,int ShowFlags);

Description of parameters:

ParentWin This is lister's window. Your plugin window needs to be a child of this window

PluginWin The plugin window returned by ListLoad
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

More:

unit listplug is invalid. Try to copy/paste it; you missed interface/implementation prts.
User avatar
D1P
Senior Member
Senior Member
Posts: 233
Joined: 2005-02-28, 18:29 UTC
Location: Moscow
Contact:

Post by *D1P »

I have some misunderstand of wdx-plugins documentation. In ContentGetDetectString function description i see following remarks:
The 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"
And description of FORCE and MULTIMEDIA operands have surprised me :). 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.
mofi
Junior Member
Junior Member
Posts: 15
Joined: 2007-01-28, 10:13 UTC
Location: Vienna

Mistakes in wcx_ref2.12.zip (04.01.2007) for packer plugins

Post by *mofi »

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:
  1. Overview
  2. What's new
  3. OpenArchive
  4. ReadHeader
  5. ProcessFile
  6. CloseArchive
  7. SetChangeVolProc
  8. SetProcessDataProc
  9. PackFiles
  10. DeleteFiles
  11. GetPackerCaps
  12. ConfigurePacker
  13. StartMemPack
  14. PackToMem
  15. DoneMemPack
  16. CanYouHandleThisFile
  17. PackSetDefaultParams
  18. ReadHeaderEx
  19. tHeaderData
  20. tHeaderDataEx
  21. tOpenArchiveData
  22. PackDefaultParamStruct
  23. tProcessDataProc
  24. tChangeVolProc
  25. Error Codes
  26. Header for C(++)
  27. Header for Delphi
Navigation list:
  1. Content
  2. Overview
  3. OpenArchive
  4. ReadHeader
  5. ProcessFile
  6. CloseArchive
  7. PackFiles
  8. DeleteFiles
  9. GetPackerCaps
  10. ConfigurePacker
  11. SetChangeVolProc
  12. SetProcessDataProc
  13. tHeaderData
  14. tOpenArchiveData
  15. tProcessDataProc
  16. tChangeVolProc
  17. Error Codes
  18. Header for C(++)
  19. Header for Delphi
Page DeleteFiles: The first sentence does not end with a full stop.


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
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
Regards from Austria!
Post Reply