Plugins in C# ?

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
MarkusD
Junior Member
Junior Member
Posts: 4
Joined: 2003-12-05, 13:21 UTC

Plugins in C# ?

Post by *MarkusD »

Hi there,

i'm interested in programming a plugin as well. But since it's ages ago since i did some c, and i never was really good in c++, the question arrises if it's possible to write a plugin with c#

I did some research ,and i think it's in general possible, using the "Marshalling" Mechanism, however it don't have any working source etc. which could be useful as a start.

Anyone who wrote a Plugin and spend some time with C# ,may give me some hints?

For those who don't know C#: It's a C/C++/Java like language, that builds upon the .NET Framework of Microsoft.
User avatar
havanna
Member
Member
Posts: 163
Joined: 2003-02-27, 08:06 UTC
Location: Baden/Württemberg

Post by *havanna »

I don't have much experience in c#, but wouldn't it require the .NET Framework to be installed?
Tanstaafl
MarkusD
Junior Member
Junior Member
Posts: 4
Joined: 2003-12-05, 13:21 UTC

Post by *MarkusD »

Indeed. And that's the main problem, because C# runs in a protected environment (like Java)

However there is a way to call C-Functions with a method called "InterOp", i just not sure yet if it's possible to go the other way: provide the interface wincmd needs for a plugin.

Someguy on a C# forum answered ,that it is possible, however i don't have any more details yet.
User avatar
Dark One
Junior Member
Junior Member
Posts: 40
Joined: 2003-05-19, 10:48 UTC
Location: Serbia

Post by *Dark One »

i think you should reconsider that c# thing... if a plugin needs several megs of libraries, i won't even consider downloading it. many others won't either. i fyou realy want to write it, just find your old dusty copy of borland's builder...
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50390
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I wouldn't recommend it either. Plugins should be as small and fast as possible, because especially in Lister TC will load all plugins at startup when they have a matching detect string. Packer plugins may get loaded when searching in archives. Only file system plugins are uncritical, they get loaded only when the user double clicks on them.
Author of Total Commander
https://www.ghisler.com
User avatar
Ergo
Senior Member
Senior Member
Posts: 204
Joined: 2003-02-05, 12:20 UTC
Location: Belarus
Contact:

Post by *Ergo »

There were some plugins written in C# - TurboRegistry and Playlist. Both are slower and much bigger in comparison with plugins written in other languages.
Wincmd.ru WWW.TOTALCMD.NET
I see that future is near...
User avatar
Hacker
Moderator
Moderator
Posts: 13142
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

There were some plugins written in C# - TurboRegistry and Playlist.
That would be TurboWinamp, not sure about Playlist.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
Ergo
Senior Member
Senior Member
Posts: 204
Joined: 2003-02-05, 12:20 UTC
Location: Belarus
Contact:

Post by *Ergo »

of course TurboWinamp
Wincmd.ru WWW.TOTALCMD.NET
I see that future is near...
MarkusD
Junior Member
Junior Member
Posts: 4
Joined: 2003-12-05, 13:21 UTC

Post by *MarkusD »

thanks for the Hints. Speed is not really an issue.
Since i'm now used to C# , i would like to give it a go.

It's clear that a C-Plugin would fit in better and would make more sense, but the Question was, if there is a way to write one in C# or not.

It looks like it is possible, i will try to find those plugins mentioned.

By the way ,you can write C# programs who don't use any of the .NET Framework Libraries ,however since the ".exe" of a C# is needed to be compiled on execution ,there will be a definite slowdown (and more memory use) as with a native c-code programs.

I'm really not keen to go into C/C++ again (i wrote some programs 10 years ago, it wasn't that difficult), but it would be fun to do something with C# even if it doesn't make much sense ;)
Peter Abelsson
Junior Member
Junior Member
Posts: 5
Joined: 2003-03-14, 13:38 UTC

Post by *Peter Abelsson »

Hi,

I'm the author of TurboWinamp and TuroboRegistry. Only TurboWinamp is written in C# and requires the .Net runtime. TurboRegistry is pure C++ although I use a premade COM-component for the Hex-edit part which makes it dependant on the MFC-dlls. (Hard to program without dependancies nowadays...)

I agree that C# is perhaps not the optimal language to write Total Commander plugins in. But well I've been programming to much in Java to be really happy about having to deal with C++ stuff like memory allocation and lack of support libraries. So sadly think that the TurboWinamp plugin wouldn't have been made at if C# hadn't been around.

Another idea I had was to make a Total Commander plugin in Java and compile it to native code with the GNU gcj compiler. I played around with it a bit, but the I was never really successful. In that way it would at least be possible to make a plugin in a high level language without requiring the user to download JVM:s or runtimes of any kind.

P.S
I suspect that Microsoft will build in the .NET runtime in Longhorn (next version of Windows) so then TurboWinamp won't require an extra download at least ;)
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Peter Abelsson wrote: P.S
I suspect that Microsoft will build in the .NET runtime in Longhorn (next version of Windows) so then TurboWinamp won't require an extra download at least ;)
Yes, but there still will be lot of people who will be using older versions of Windows (9x, NT, etc).
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
MarkusD
Junior Member
Junior Member
Posts: 4
Joined: 2003-12-05, 13:21 UTC

Post by *MarkusD »

In our Company we will use the .NET Framework by default in the Future ,so it's not a problem for me as well.

Similar to Peter, i prefer to code in C# in the moment.

Thanks to Peter ,i can now try to write a plugin myself, i just need to study his sources a bit more :)
Clem
New Member
New Member
Posts: 1
Joined: 2005-07-16, 12:31 UTC
Location: Oslo, Norway

Post by *Clem »

I'm looking for ways to create TotalCommander FileSystem plugins using C#. (My C++ is not that good.)

Is it possible to get the source for TurboWinamp somewhere? I could really need some help getting started.

I've been looking all over, also tried Peter's email adress that was in the readme file of his TurboWinamp plugin, seems to be outdated. :(
Post Reply