Welcome Guest.   Make a donation to an author on the site July 28, 2014, 07:38:49 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Free DonationCoder.com Member Kit: Submit Request.
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: Plugins in C#  (Read 3823 times)
vitalyb
Supporting Member
**
Posts: 141



see users location on a map View Profile Give some DonationCredits to this forum member
« on: November 12, 2007, 10:37:15 AM »

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.
Logged
mouser
First Author
Administrator
*****
Posts: 33,183



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: November 12, 2007, 10:53:50 AM »

It would be *wonderful* if you could create such a thing!  Kiss

Please contact me (mouser@donationcoder.com) 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 smiley
Logged
Arjen
Charter Member
***
Posts: 93



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: November 12, 2007, 02:16:12 PM »

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?
Logged
vitalyb
Supporting Member
**
Posts: 141



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #3 on: November 16, 2007, 07:38:58 AM »

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.
Logged
mouser
First Author
Administrator
*****
Posts: 33,183



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: November 16, 2007, 08:19:08 AM »

Sounds like a good way to do it  thumbs up
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.029s | Server load: 0.03 ]