INTERACT FORUM

Please login or register.

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

Author Topic: Help - Plugin won't load?  (Read 3842 times)

MahlerFreak

  • Recent member
  • *
  • Posts: 49
Help - Plugin won't load?
« on: October 23, 2006, 08:37:34 pm »

Yes, it's me again  :(

Now I've got a problem where I can install my plugin DLL just fine on the development machine where I built it, but not on any other machine. I browse to the DLL from "Add Plugin" in "Manage Plugins", open it, and get a "Failed to install plugin" message. I put debug messages at the beginning of DllMain and DllRegisterServer, but it never gets that far. This might seem to indicate a failure to load the DLL in LoadModule - maybe due to a missing dependency of some kind?

This seems like more of a generic DLL problem than a MC problem, but any advice anyone can give would be greatly appreciated.

Thanks,

Scott
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Help - Plugin won't load?
« Reply #1 on: October 23, 2006, 11:02:01 pm »

I've had it fail to install due to not having the correct IVersion or perhaps a missing interface.  But I've never had it not even get to DllRegisterServer.  And it should get there even if some dependencies aren't there (it just wouldn't run correctly later).

I'm no expert, so I'm just going to throw out a couple of ideas.  And they're all C++ but may be similar in other compilers/languages.

Make sure you've overridden the DllRegisterServer function correctly and it's not headed straight for the base class.

Sometimes the manage plugins has not always worked correctly.  Running it from an *.mjp might fix it.

Try running it from regsvr and see what happens.  Double check the registry entries it makes.  Especially the path to the dll and that the dll is there.

Good luck!

Logged

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
Re: Help - Plugin won't load?
« Reply #2 on: October 24, 2006, 04:32:05 am »

I've had it fail to install due to not having the correct IVersion or perhaps a missing interface.  But I've never had it not even get to DllRegisterServer.  And it should get there even if some dependencies aren't there (it just wouldn't run correctly later).

Erm no ... if there are missing dependancies, e.g. DLLs, then Windows cannot load the DLL.   Use dependency walker to find out what's missing:

http://www.dependencywalker.com/


But I expect it will either be missing MSVC, MFC or ATL dll's.
Logged

MahlerFreak

  • Recent member
  • *
  • Posts: 49
Re: Help - Plugin won't load?
« Reply #3 on: October 24, 2006, 10:41:14 am »

But I expect it will either be missing MSVC, MFC or ATL dll's.

Thanks! That is exactly what the problem was. And I was so sure I had everything statically linked ...

Thanks much for the pointer to dependency walker. What a sweet little tool that is.

scthom, where did you learn to write .mjp files? I've read the online page in the developer area, but there seems to be, er, some missing context. I want to package everything up - DLL, web client, etc - in one file and have MC install it for me. It seems that is what .mjp files are for, but the basics of how one puts it together I seem to have missed somewhere.

Thanks again for the help!

Scott
Logged

scthom

  • Citizen of the Universe
  • *****
  • Posts: 621
Re: Help - Plugin won't load?
« Reply #4 on: January 11, 2007, 07:21:10 am »

Quote
scthom, where did you learn to write .mjp files? I've read the online page in the developer area, but there seems to be, er, some missing context. I want to package everything up - DLL, web client, etc - in one file and have MC install it for me. It seems that is what .mjp files are for, but the basics of how one puts it together I seem to have missed somewhere.

Sorry, I just found this.  There is a lot of missing "context" -- trial and error is how I learned to get it right.  That, and looking at some other ones as a reference.

You can get the .mjp file to unzip (so you can package it all up) and then copy certain pieces to certain directories, or install.  So, yes, the .mjp will do what you want.  Here's a typical one for one of my plugins:

Code: [Select]
[Package]
Name=WavPack Plugin
Action=NONE
Version=2.1.0
URL=in_wavpack.dll

[Action]
File1=in_wavpack.dll
File1Action1=COPY_PLUGINDIR
File1Action2=REG_PLUGIN

Mine are Action=NONE because the mjp is inside the zip and in order to use it you've already unzipped the file.  One headache required due to the way Sourceforge hosts files.  It would actually be easier to have the URL link to a hosted file, which is the way JRiver's plugin download mechanism works.
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Help - Plugin won't load?
« Reply #5 on: January 11, 2007, 10:34:03 am »

This kind of stuff is perfect for the Wiki. I created a DevZone page (but didn't transfer all the stuff from the old dev zone yet), and stuck your nugget there:

http://wiki.jrmediacenter.com/index.php/DevZone

Thanks!

j

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Help - Plugin won't load?
« Reply #6 on: January 11, 2007, 12:11:20 pm »

Okay, I did a better job: started on the DevZone stuff, and got all the package stuff over, improved it, and added a section for XML MJP files.

Enjoy

j

MahlerFreak

  • Recent member
  • *
  • Posts: 49
Re: Help - Plugin won't load?
« Reply #7 on: January 13, 2007, 03:40:42 pm »

Thanks for that!
Logged
Pages: [1]   Go Up