Delphi source sample for WFX plugin

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Delphi source sample for WFX plugin

Post by *fabiochelly »

Hi,

I try to create my own plugin but the sample is only in C++.
Does somebody have the delphi source of a very simple plugin to understand how it works ?
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

Its rather simple, read the through the help file, to see the parameter list on each function. Also in Delphi, make sure to mark the functions to use the stdcall callback method, or is it the cdecl, cant remember.

Code: Select all

function SomeFunc(SomeParam: Integer); stdcall;
I can understand that u want to see some code, but its best to read the docs, than guess from the code imho.

Added L8er:
Remember to export the functions, like this...

Code: Select all

exports
  FsInit, FsFindFirst, FsFindNext, FsFindClose, FsMkDir, FsGetFile, FsDeleteFile, FsRemoveDir, FsGetDefRootName;
Of all the planets I've been to, this one is my favorite.
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

I have already done that but it doesn't work!
That's why I'm asking some code.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
Aezay
Senior Member
Senior Member
Posts: 269
Joined: 2003-02-12, 07:27 UTC
Location: Denmark
Contact:

Post by *Aezay »

OK then, try to look at this, the compiled binary is accepted by TCmd but since i dropped the idea (guess why) its full of bugs :roll:.
Some of the functions called in this project (the 1s starting with FL_) are from another file, just ignore/delete those lines.

http://users.cybercity.dk/~bfy1097/_upload/RegCmdTC.dpr
Of all the planets I've been to, this one is my favorite.
User avatar
André Martin
Senior Member
Senior Member
Posts: 245
Joined: 2003-02-05, 15:46 UTC
Location: Dresden, Germany

Post by *André Martin »

The Ext2+Reiser fs plugin is written in Delphi, comes with source and is a good starting point...
Browse the web with the HTTP SmartBrowserPlugin
Check your mails with the POP3/SMTP EmailPlugin!
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

2 Aezay & André Martin:
Thanks.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
Nigurrath
Senior Member
Senior Member
Posts: 225
Joined: 2003-02-05, 12:41 UTC

Post by *Nigurrath »

@all
you mentioned some source for a wfx plugin in MSVC++..I were just looking for this..were is it??
always latest 32b TC on a WIN10 64b
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

You can find it on this page with the plugin writer's guide:
http://www.ghisler.com/plugins.htm#filesys
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
Nigurrath
Senior Member
Senior Member
Posts: 225
Joined: 2003-02-05, 12:41 UTC

Post by *Nigurrath »

Oh, God..I forgot to look in the most probable place :) :)
always latest 32b TC on a WIN10 64b
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

André Martin wrote:The Ext2+Reiser fs plugin is written in Delphi, comes with source and is a good starting point...
Be careful, this is a plugin under GPL because it uses GPLed source code, so your plugin needs to be open source too if you base it on this plugin!
Author of Total Commander
https://www.ghisler.com
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

I don't want to base my plugin on any other plugin.
I just wanted to know how to use the default callback functions.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
Maxwish
Senior Member
Senior Member
Posts: 370
Joined: 2003-02-05, 19:13 UTC
Location: .NL

Post by *Maxwish »

Otherwise known as: Look 'n' Learn :D
...BRB...
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

Is there a way to manually reload files and launch FNC again ? (after a fsexecute on a file for instance)
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

In Total Commander 5.51, the command will be cm_UnloadPlugins

Add it to a button, then click it every time you want to unload the plugins - this will unload all running plugins! Please note that Lister plugins will only be unloaded after all Lister windows are closed (or not showing any lister plugins).
Author of Total Commander
https://www.ghisler.com
Post Reply