Plugins in C# ?
Moderators: Hacker, petermad, Stefan2, white
Plugins in C# ?
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.
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.
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.
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.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
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
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

-
- Junior Member
- Posts: 5
- Joined: 2003-03-14, 13:38 UTC
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
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

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.
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.
