INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Interface Plugin 'AutoSkypeMute' must implement IDispatch Interface  (Read 3271 times)

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone

Hi,

I've got a problem with creating my DLL after some restructuring of Code. I've written a Class that colorizes my plugins using the skincolors and wanted to centralize that code in a Project called 'Library'. So far I've created 2 plugins for MC and the funny thing is that the AutoEQ Plugin has no problem with the external Project Library but the AutoSkypeMute project does. The following happens. After compilation of the DLL which is 'Build Successfull' (Always happy to see that notification) I start MC. When I click on the 'AutoSkypeMute' Service I get a message that says "Interface Plugin 'AutoSkypeMute' must implement IDispatch Interface". I believe this to be a message from MC, but I'm not shure.

When I move the Class from the Library Project to the AutoSkypeMute Project, everything still compiles OK but I don't get the Message from above anymore. Anyone got a clue?

Paul.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone

Not to worry, I've solved the problem. Don't ask me why but I also needed to set the option 'Make assembly COM-visible' in the 'Assembly Information' Dialog in the Properties of the Library Project (wow hope every understands that). Now it works fine again.
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D

The make assembly com visible tag essentially does the same as Regasm /Codebase.
It means everytime you rebuild your assembly it will be re-registered for use
with COM stuff.  It speeds up seeing the latest build when you're rebuilding constantly in Visual Studio.

I don't think I've seen the IDispatch message before however.

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone

Hi ChriZ,

The wonderous World of C# and Visual Studio is unfolding to me. I must say the beginning is a real struggle. I've been programming, in god knows how, many languages. And I've seen my share of difficult IDE's (Borland was famous for it's tremendous amount of settings one could set). I truly like the IDE Microsoft creates and most of the time I find my way easely but this time I had a real struggle to find the right settings. Just now I found out that copying a file from one Project to another not realy copies the file but only the reference to it, so you're in fact still editing the file in the previous location and therefore I thought I had lost a whole day of programming. After drag-n-dropping it from the new location I saw my old code back again (pfew). I also have a saved version in SVN so no real harm done here.

I've build in the Presets in the AutoEQ and made some nice adjustments to the code so I'll be releasing the newest versions pretty soon. Hope JRiver will put them on the Third Party Site so everyone can enjoy my handywork.

Paul.
Logged

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone

The make assembly com visible tag essentially does the same as Regasm /Codebase.
It means everytime you rebuild your assembly it will be re-registered for use
with COM stuff.  It speeds up seeing the latest build when you're rebuilding constantly in Visual Studio.

I don't think I've seen the IDispatch message before however.

B.t.w. does this mean I also have to regasm the Library.dll in the Innosetup?
Logged

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D

To get stuff on to the skins and plugins area take a look here
http://yabb.jriver.com/interact/index.php?topic=21855.0

It some times takes a while, as it's usually as Bob gets some spare time,
but he's usually pretty quick.

It's usually a good idea to test Beta's just on the Third Party Plugin Forum
first however.

Mr ChriZ

  • Citizen of the Universe
  • *****
  • Posts: 4375
  • :-D

B.t.w. does this mean I also have to regasm the Library.dll in the Innosetup?

From what I remember only the plugin assembly itself needs Regasm'ing.

PaulSinnema

  • Galactic Citizen
  • ****
  • Posts: 393
  • You don't know what you're missing until its gone

It's usually a good idea to test Beta's just on the Third Party Plugin Forum
first however.

Aha, you mean just make a new Topic and release it there as a beta.
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621

Yeah, that's easiest.  Also if you are going to be releasing a number of versions, it's easier to update, as working through the submittal page (and thus Bob) is not that quick.  He can make the entry a link to your site, though, and that's a pretty good solution for most of us.

As for the IDispatch Interface.  That's an MC notification, but it means the Dispatch interface hasn't been exposed for MC to find.  I suspect it's typically more of an issue with C++ than C#, but it mostly comes into play if you have multiple interfaces exposed and more than one is Dispatch (there can only be one dispatch interface).  This is essentially the problem I was having with implementing events until I discovered you can make the event interface DispEvent instead of just Dispatch.

Anyway, MC queries the dispatch interface looking for the init function.  If it can't be found, then the plugin can't be run.  It's all part of COM.
Logged
Pages: [1]   Go Up