INTERACT FORUM
Windows => Plug-in Development => Topic started by: mattsnuts on June 05, 2003, 09:30:36 pm
-
Is there any sample code out there for a first project?
eg. a Hello World that displays the currently playing song?
I have Visual Studio 6 and VS .NET...
My goal is to create a plugin whereby the user could rightclick an Artist or Album in a View Scheme and choose my plugin from the context menu.
-Matt
-
Start here and look at "Interface Plugins"
http://www.musicex.com/mediacenter/devzone.html
Thanks and good luck :)
-
Thanks Matt
I'd looked at that page but hadn't seen the interface SDK download, quite hard to spot! But I found it a few days ago and have been coding.
http://www.musicex.com/mediajukebox/DevZone/int_sdk.zip
My other downfall was when I was extensively searching (honest!) these boards for posts and example code, I hadn't noticed the "Max age since last post" field, which was set to 7 days. Doh!
My plugin writes the currently playing song to a text file, for use in Outlook as a sig file. I probably wouldn't have bothered coding this if I had have known about the "Copy Listening To" function which is on the Context Menu when you right-click "Playing Now". But by the time I found that function I was halfway to coding the plugin, so I pressed on :)
The only downfall with it is, since it's an Interface plugin, it only works (ie. writes the file) when it's running, ie. when the user has my plugin's interface open, which is lame and pointless. It needs to be running all the time to be worthwhile.
So, I need to re-code it somehow so that it's always running. How do I do that? My guess is I need to do this as a DSP plugin. Which may mean a port to C++... :-/
-Matt
-
Try changing PluginMode to 1 to make it constantly run.
If you are using VB look in your .reg file.
If you are using C/C++ or some other decent language look in your DllRegisterServer function, e.g.:
// Register with Media Jukebox v9
CRegistry reg;
reg.SetRootKey( HKEY_LOCAL_MACHINE );
if( reg.SetKey( "Software\\JRiver\\Media Jukebox\\Plugins\\Interface\\" MAIN_TITLE, true ) )
{
reg.WriteString( "CLSID", TW2A( _bstr_t(strID) ) );
reg.WriteDword( "IVersion", 1 );
reg.WriteString( "Company", "RhinoBanga" );
reg.WriteString( "Version", "1.00.00" );
reg.WriteString( "URL", "" );
reg.WriteString( "Copyright", "Copyright (c) 2002." );
reg.WriteDword( "PluginMode", 1 );
}
else
{
MessageBox( HWND_DESKTOP, "COULD NOT REGISTER DLL WITH MC!", MAIN_TITLE, MB_ICONSTOP );
}
-
If you are using VB look in your .reg file.
If you are using C/C++ or some other decent language look in your DllRegisterServer function
Cutting! Are you not a VB fan then?
Adam
-
Well you can also write it in VB code
Module
Public Sub CreateKey(Folder As String, Value As String)
Option Explicit
Dim b As Object
On Error Resume Next
Set b = CreateObject("wscript.shell")
b.RegWrite Folder, Value
End Sub
VB
CreateKey "HKCU\Software\JRiver\Media Jukebox\Plugins\Interface\Chart Finder\PluginMode", "1"
no matter if it is in C Or VB the plugins use Registry.reg file.
RhinoBanga and I use an installer program so we do not need to use the Registry.reg file that comes in the sdk
-
Cutting! Are you not a VB fan then?
Adam
Yes, but for prototyping only.
Once you start doing anything serious in VB you notice it's deficiencies.
-
no matter if it is in C Or VB the plugins use Registry.reg file.
RhinoBanga and I use an installer program so we do not need to use the Registry.reg file that comes in the sdk
Not true at all ... C/C++ does not need to use .reg files.
COM DLL's are self registering and this is done via the DllRegisterServer entry point in a DLL.
So AV doesn't use .reg files.
-
I would use C++ if I could understand it ;D
One of these days I will take a course but until then...
Adam
-
>> So AV doesn't use .reg files.
Ok, But VB does not need them also if done in the installer.
but i get your point now.
-
>> I would use C++ if I could understand it
I have it but it is harder for me to understand also
thats why i don't think of my self as a real programer.
Real programers Use C++ Visual C, Etc...
-
I'll add my 2 cents worth...
I'm a computer programmer by trade, just an average one. I trained with C++ under Linux for 4 years at University, and found it an easy language.
Then I entered the workforce and had to deal with Windows C++... urgh. MFC made things easier, but COM is still a messy nightmare for me.
VB's OK, well it's nice and easy to use, but can be unstable. Still, it beats getting tangled up in COM. But I'd never release a commercial VB app.
I'm really loving C#, although I've yet to use it commercially, I've only played with it at home. Seems to me to be the best of both worlds - VB's ease of use and C++'s power.
FWIW, I've pretty much finished work on my plugin and will release it once I figure out how to package it :)
-Matt
-
>> I've pretty much finished work on my plugin and
>> will release it once I figure out how to package it
RhinoBanga turned me onto Inno Setup Compiler
Works Really Good And It's Free!
-
I am thinking of learning C# for a number of reasons. 1) People say VB has changed so much that to learn VB.Net would be almost as difficult as learning C#
2) C# is a new language so I won't be really far behind people in terms of learning it as most epople will be in the same boat (tho obviously Java and C++ developers will have an edge).
3) Its seems more powerful than VB.NET and utilises the framework better as it was written for the framework rather than being an old language hacked to work with it.
I will get some books out and see how I get on.
Adam
-
The two reasons why I haven't botherd looking at C# yet are:
1) Companies want C++ programmers more than C#.
2) C# is not multi-platform ... yet
When both of those change then I'll bother ... until then I'm not touching it.
-
There is that project that is currently developing the .NET platform for Linux. I can't rememebr what is called. Once that is up and running all .NET labguages should be multiplatform. I may take a closer look at C++ but it just looks so alien to me ;D
Adam
-
Hello.
This thread has made reference to writing MediaCenter plugin using VB. I am curious. Have any of you actually done this? Did you use Windows Scripting Host? Try as I might, I could not get a plugin to work this way. I want to write a plugin using JavaScript under Windows Scripting Host.
I am a C/C++ programmer in my real job, but I want the simplicity and casualness of JavaScript for this home project.