ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > FARR Plugins and Aliases

Plugins in C#

(1/1)

vitalyb:
Has anyone yet wrote a wrapper to allow us to write plugins in C#?
I intend to do it if not, a bit worried it wouldn't be fast enough though.

mouser:
It would be *wonderful* if you could create such a thing!  :-*

Please contact me ([email protected]) and i can help a bit.

One of the members of the forum, Okke, did an amazing job making a Delphi wrapper for FARR, and his work will probably be the most help for you since his is an example of how to recreate the C++ wrapper helper functions.

My eternal gratitude and a rare FARR Plugin Creator mug starring our mascot Cody is yours if you can do it :)

Arjen:
I am interested in this as well. Time allowing I'm willing to help create a wrapper like this. I had a short look at the SDK but have chickened out so far. :-) If I understand correctly, a FARR plugin is a DLL that must expose certain functions. One of the hard things I think will be to map the data types from C++ to C#. Mouser, can you give a short overview of what a plugin should look like?

vitalyb:
Hey, just a quick update about the C# plugin SDK:

Every C# plugin will consist of two DLLs:
1) The C++\CLI (managed C++) assembly
2) The C# assembly

When FARR loads the C++ plugin it calls its OnInit() function which in turn uses reflection to find its required C# assembly into the memory. Then it is just a matter of passing each function call to the managed extension and converting the data back and forth from managed to unmanaged types.

When it is done, the idea is that the C# developer wouldn't be aware of the C++ plugin at all, he'll just need to add a reference to my managed C++ assembly, inherit from a certain base class and override the functions he wants to.  I'll have a VERY basic (just one function) prototype working today, probably.

Right now I have most of the basic functionality built in and I believe I can do the first real C# plugin in the next days.

mouser:
Sounds like a good way to do it  :up:

Navigation

[0] Message Index

Go to full version