INTERACT FORUM

Windows => Plug-in Development => Topic started by: Zep2000 on November 29, 2005, 07:50:32 am

Title: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: Zep2000 on November 29, 2005, 07:50:32 am
Hi everybody,

I have bought MediaCenter 11 a couple of months ago now and I really enjoy it, it is soooo cool.
Now that I am used to it, I was thinking of developing some plugins for it.
I have played a lot with VB6 in the past and I saw that there is an Interface plugin example available, so I decided to download it and play.

Now, after thinking a bit and reading the forum, I have seen that many people are interested but don't know where to start, especially when using .Net and Visual Basic. So, I installed VB Express 2005 on my disk and upgraded BusyBox to .Net.

Now comes the problem: it doesn't work, or better, I can't make it work.

I have:

- compiled my BusyBox to BusyBox.dll, it created the dll + Interop.MusicJukeBox.dll (I guess it's the Assembly wrapper for MEdiaJukebox.tlb)
- I used "regasm" to create a regedit file to register the type to COM (in the registry) for my assembly and ran the generated reg file
- I ran the provided reg file to register the plugin to MediaCenter

The plugin shows in MediaCenter Plugin Manager but cannot start (not found).

Can someone please help me so I can describe the whole procedure of developing a simple plugin in VB .Net to everybody in exchange.
I think that the community will definitely like the idea of having a step-by-step development guide. I can work on it, just please help me a bit. I'm new to COM Interop and plugin dev but I think I can learn as I have many years of experience in programming behind me.

Thanks a bunch in advance for everybody. No pretention from me here, just wanting to help.

Cheers,
Nico
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: KingSparta on November 29, 2005, 08:11:57 am
Few People Have Gotten VB Net To Work In MC, But Not Me To The Point Of Creating A Install Program.

I Gave Up.
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: Zep2000 on November 29, 2005, 09:34:07 am
Hi King Sparta,

So, what do you suggest? Would developing in VB 6.0 be any better? It's the past but if it works....
Besides, I'm better at VB 6.0 than I am at VB .Net.

Also, would it be possible to voice those concerns to the creators so that things are made easier? Is there anybody from the company that is reading those forums? I'm new to these.

Cheers,
N.
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: KingSparta on November 29, 2005, 10:23:12 am
I see no advantage in moving to VB .net at this time.

VB 6.0 With SP6 Works Quite Well.

VB Net in the next Two years may be worth moving to when MS releses there new 64 bit windows OS.

Been Looking At The Dell XPS
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: scthom on November 29, 2005, 08:02:45 pm
If it's any consolation, I had a hard time experimenting with C++ .NET as well.   The .NET language is a bit different in terms of the DLLs and how they are created.  Since all of the MC SDKs are not .NET, the translations can be tricky unless you are pretty good, which I apparantly wasn't  :)

So I stuck with the traditional method of building DLLs, which is what the SDKs are built around (at least the C ones).
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: Zep2000 on November 30, 2005, 01:39:39 pm
Well, it seems I'm not any better at this.

I reverted to VB6SP6 and I'm starting development now.
I'll keep you informed.  ;D
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join developme
Post by: cncb on November 30, 2005, 03:14:12 pm
I wrote my interface plugin using .NET (C#).  I think the step you are missing is that the assembly that you built and registered has to be copied to the main running directory of Media Center.  This is also true of any supporting assemblies (not global system assemblies) including the interop assembly generated for Media Center.
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: KingSparta on November 30, 2005, 03:31:38 pm
Quote
the assembly that you built and registered has to be copied to the main running directory of Media Center.
I am Sure JRiver Does Not Want That To Happen as it could have an effect on there product.






Title: Re: Upgrading BusyBox example to .NET - Please help so others can join developme
Post by: cncb on November 30, 2005, 03:46:22 pm
I was trying to suggest why it is not working and a simple way to hopefully get it to work.  There is a way to register the assembly to run from a different directory (I think a "codebase" switch in regasm).  I really don't see a problem having it in the same directory since we are talking about a plugin that may mess up Media Center no matter where it is located.
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: KingSparta on November 30, 2005, 05:54:16 pm
Just meaning, that it would then be mixed with there own dll's adding to customer confusion when the customer has a problem or is wondering "what this here dll is".

thats all i ment by that.
Title: Re: Upgrading BusyBox example to .NET - Please help so others can join development!!
Post by: Zep2000 on December 01, 2005, 11:38:35 am
Then I think JRiver should guide us in the right direction and tell us how to do it properly.

to cncb: I tried to move it to mediacenter's root dir and it doesn't work either. I used regasm with the file from the root dir and checked the registry, it's in there.

I don't know what's wrong with it.


Title: Re: Upgrading BusyBox example to .NET - Please help so others can join developme
Post by: cncb on December 01, 2005, 12:52:30 pm
Make sure that the interop assembly is in the root directory too (Interop.MusicJukeBox.dll that you refer to).  Also it looks like the ProgID that MC is looking for is "BusyBox.BusyBoxCtrl" so make sure that regasm added this ProgID.  And finally, if you are using v11 the type library was renamed to "Media Center.tlb".  So you probably should refer to the new type library (and thus new interop assembly).