Using C# with MM

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Do you use C# in connection with MM?

Poll ended at Sun Dec 16, 2007 6:22 am

Yes
4
33%
No
8
67%
 
Total votes : 12

Using C# with MM

Postby gideonrv » Fri Nov 16, 2007 6:22 am

I don't know how many of us use C# as a means of handling the MM library. At least I do, and it deserves a serious poll.
I decided to write a wrapper library that exposes MM methods and properties in C# conventions, like using square brackets ([]) instead of get_item(). I do it for my own needs, but if it's usable, I don't mind to let the forum members use it.
My first question is how to get the already open instance of MM application, or to throw an exception if there's no such one. Since C# is NOT a scripting language, it runs as an independent program, outside MM.
gideonrv
 
Posts: 42
Joined: Tue Feb 20, 2007 12:24 am
Location: Israel

Postby Steegy » Fri Nov 16, 2007 1:50 pm

How to get a reference to MM (a running instance, or a new one) is explained here (at the bottom). This is the most simple, "normal" and intended use. You can also use late-binding but that's a much less attractive subject and probably the only reason why you would want to use that is if you want to keep all code in one single exe file (because early binding uses an COM interop dll)

By looking if the MediaMonkey process is running (through .Net or Win32) or by looking if there's a MediaMonkey window created (through .Net or Win32), you know if MM is active or not.

Cheers
Steegy
Extensions: ExternalTools, ExtractFields, SongPreviewer, LinkedTracks, CleanImport, and some other scripts (Need Help with Addons > List of All Scripts).
Steegy
 
Posts: 3448
Joined: Sat Nov 05, 2005 7:17 pm
Location: Belgium

Re: Using C# with MM

Postby Thanasis » Fri Apr 13, 2012 2:24 am

Using C# to write add-ons for MM is a niche. Only few people bother with it.
Yes I use C# with MM.
I do it with the help of Visual Studio 2010

And I invite everybody who does the same to share knowledge......

With the Events Support in C# starting from MM 4.0+ , you can almost do everything.

Lately I managed to Communicate between my C# and MediaMonkey's VBScript application using COM (Component Object Model).

I have also to managed to make many MM Events work in C#.

Well. Don't be dead. Communicate and Share !!!!
Thanasis
 
Posts: 84
Joined: Sun Aug 28, 2011 2:53 am


Return to Need Help with Addons?

Who is online

Users browsing this forum: No registered users and 27 guests