INTERACT FORUM
Windows => Plug-in Development => Topic started by: Cephlen on November 21, 2002, 10:36:13 am
-
Ok.. I have my control that builds ok.
However, I am not able to add it to MJ9. I goto plugins, and select add new. I navigate to the location of my DLL and select it. I get an error message:
Unsupported plugin type. The plugin can not be installed.
This code is pretty much a copy n paste with some porting from vb to C#.
Just wondering what needs to be done / is different.
Thanks..
-
I'm not sure "Plugin Manager->Add" works for interface plugins. (though should make it so it does)
So, you'll need to add info to the registry to tell MJ the plugin exists. Check out some of the samples in the Developer's Zone for an example.
-
Something RhinoBanga Helped me with
Note the [Registry] thats where the Install tells MJ the plugin Exists.
I basicly took what he had and played with it untill it worked.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
Compression=bzip
OutputBaseFilename=Chart Finder - Installer
AppName=Media Jukebox Chart Finder
AppVerName=Media Jukebox Chart Finder 1.0.15
AppPublisher=Mark Farmer
AppPublisherURL=http://home.nc.rr.com/mycddblookup/index.html
AppSupportURL=http://home.nc.rr.com/mycddblookup/index.html
AppUpdatesURL=http://home.nc.rr.com/mycddblookup/index.html
DefaultDirName={pf}\Mark Farmer\Chart Finder
DefaultGroupName=Mark Farmer\Chart Finder
AlwaysCreateUninstallIcon=yes
[Files]
Source: "C:\00 - MJ Plug-Ins\Chart Finder\ChartFinder.ocx"; DestDir: "{app}"; CopyMode: alwaysoverwrite; Flags: restartreplace regserver
Source: "C:\00 - MJ Plug-Ins\Chart Finder\Top 100 Billboard.csv"; DestDir: "{app}"; CopyMode: alwaysoverwrite
Source: "C:\00 - MJ Plug-Ins\Chart Finder\U.K. Top 40.csv"; DestDir: "{app}"; CopyMode: alwaysoverwrite
Source: "C:\00 - MJ Plug-Ins\Chart Finder\U.S.A. Country Countdown.csv"; DestDir: "{app}"; CopyMode: alwaysoverwrite
Source: "C:\00 - MJ Plug-Ins\Chart Finder\Rick Dees Top Hits.csv"; DestDir: "{app}"; CopyMode: alwaysoverwrite
Source: "C:\00 - MJ Plug-Ins\Chart Finder\Argentina Top Hits.csv"; DestDir: "{app}"; CopyMode: alwaysoverwrite
Source: "C:\WINNT\system32\mscomctl.ocx"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile regserver
Source: "C:\WINNT\system32\msstkprp.dll"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile regserver
Source: "C:\WINNT\system32\tabctl32.ocx"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile regserver
Source: "C:\WINNT\system32\comct232.ocx"; DestDir: "{sys}"; CopyMode: alwaysskipifsameorolder; Flags: restartreplace sharedfile regserver
[Registry]
Root: HKCU; Subkey: "Software\Mark Farmer"; Flags: uninsdeletekeyifempty
Root: HKCU; Subkey: "Software\Mark Farmer\Chart Finder"
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; Flags: uninsdeletekey
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; ValueName: "IVersion"; Flags: uninsdeletevalue; valuetype: dword; valuedata: 1;
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; ValueName: "Company"; Flags: uninsdeletevalue; ValueType: string; valuedata: "KingSparta Software, Inc";
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; ValueName: "Version"; Flags: uninsdeletevalue; ValueType: string; valuedata: "1.0.15";
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; ValueName: "URL"; Flags: uninsdeletevalue; ValueType: string; valuedata: "http://home.nc.rr.com/mycddblookup/index.html";
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; ValueName: "Copyright"; Flags: uninsdeletevalue; ValueType: string; valuedata: "Copyright (c) 2002, KingSparta.";
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; ValueName: "PluginMode"; Flags: uninsdeletevalue; ValueType: dword; valuedata: 1;
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"; ValueName: "ProdID"; Flags: uninsdeletevalue; ValueType: string; valuedata: "ChartFinder.ChartFinderCtrl";
[InstallDelete]
Type: filesandordirs; name: "{group}"
-
For plugin installation in version 9,
HKCU\Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins
should be:
HKLM\Software\JRiver\Media Jukebox\Plugins
Settings should still go in HKCU.
Hope that helps.
-
Just So I Am Straight
So:
Root: HKCU; Subkey: "Software\JRiver\Music Exchange\1.0\Media Jukebox\Plugins\Interface\Chart Finder"
Should Be: (for MJ9)
Root: HKLM; Subkey: "Software\JRiver\Media Jukebox\Plugins\Interface\Chart Finder"
-
Ok guys,
I go into VS.net and choose new project. I select a language, and Windows Control Library.
I add reference to the MJ TLB.
I add the
Dim g_MJ As MediaJukebox.MJAutomation
Public Function Init(ByVal MediaJukebox As Object)
Set g_MJ = MediaJukebox
End Function
lines, build. Copy into MJ plugin dir. Run MJ, Tools->plugins->add plugin.
I get the error.
I create a registry, and can see it in the tree, select it, same error.
What am I doing wrong?
-
King, that's right. However, we copy any stuff in the old folder on startup, so you might not have to change the plugin.
Cephlen, ifyou install the Sleep Timer, you can see an example of what needs to be in the registry. But keep in mind, the Sleep Timer is putting the entries in the old spot, because it hasn't been updated yet. Sorry it's all a bit messy still...
-
>> However, we copy any stuff in the old folder on
>> startup, so you might not have to change the plugin.
Ok
-
>> What am I doing wrong?
If your just copying the plugin to the plugin dir
Create The Registry.reg file should be in sample, edit it, and run it from within the Plug-ins dir (Dbl Click on it)
-
Its a no go...
I can not get a new blank/empty .net dll control to work inside MJ9.
I guess I will have to continue work in VB.
-
I played with .Net a bit not sure I like it, maybe the next version will be better.
I Also think I need more books to read and just set down one week off and just play with it.
-
Cephlen,
I'm not sure if .NET objects work where COM objects are expected, so it may be impossible.
Can a .NET object be built in a "backwards compatible" way, or can you make a .NET project that's an old-style COM object?
Sorry we're in the dark... maybe someone else will know more.
-
Cephlen,
I'm not sure if .NET objects work where COM objects are expected, so it may be impossible.
Can a .NET object be built in a "backwards compatible" way, or can you make a .NET project that's an old-style COM object?
Sorry we're in the dark... maybe someone else will know more.
.NET objects do not have COM interfaces. One can get around this, though. See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/csref/html/vcwlkcominteroppart2cservertutorial.asp
I would assume that this will work for MC.
Also, the registry paths above are now outdated. Can't recall the correct ones now, but there's info in another thread (or just look in your registry!).
Regards,
Stuart
-
Dont know if this has been addressed since it was posted, but I've just successfuly built a .net plugin.
You need to make sure that you've got your plugin registered for COM Interop. To do this, right click on your control library in the solution explorer, hit properties, goto configuration properties->build and check "Register for COM Interop"
Also make sure your ProdID in your registry import is of the format "[ControlLibraryName].[ControlName]' , eg. MyControlLib.MyControl
Oh, and make sure to change the line that reads "Public Class UserControl1" to "Public Class [ControlName]".
Um, I think thats it.. I may have forgotten something.
Scott
-
Cephlen,
I'm not sure if .NET objects work where COM objects are expected, so it may be impossible.
Can a .NET object be built in a "backwards compatible" way, or can you make a .NET project that's an old-style COM object?
Sorry we're in the dark... maybe someone else will know more.
Matt, .NET works with Assemblies rather than COM objects, but it can generate something called a Com-Callable Wrapper (CCW) around an Assemblie to make it look like a COM object. Now, whether this is completely compatible with MJ is not a given, but the wrapper is registered in the same way as a COM object. I'm assuming that the original poster has done that, since he was referring to registry entries.
By the way, I was attempting to go in the opposite direction, to get to COM-based functions of MJ via a standalone .NET EXE (Still trying to list all the MP3 files in your database). It looks like I may have misinterpreted some of the posts here, cause I haven't been able to access Automation methods via the standalone EXE. I've referred to that in another thread, so I'll try to follow up in that thread:
http://yabb.jriver.com/interact/index.php?board=6;action=display;threadid=16371