INTERACT FORUM

Please login or register.

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

Author Topic: Help starting development  (Read 4308 times)

mattsnuts

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 82
  • that'll do
Help starting development
« 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
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42323
  • Shoes gone again!
Re: Help starting development
« Reply #1 on: June 14, 2003, 06:53:38 am »

Start here and look at "Interface Plugins"

http://www.musicex.com/mediacenter/devzone.html

Thanks and good luck :)
Logged
Matt Ashland, JRiver Media Center

mattsnuts

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 82
  • that'll do
Re: Help starting development
« Reply #2 on: June 15, 2003, 04:37:50 pm »

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
Logged

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
Re: Help starting development
« Reply #3 on: June 15, 2003, 09:53:12 pm »

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 );
   }

Logged

NoCodeUK

  • Citizen of the Universe
  • *****
  • Posts: 1820
Re: Help starting development
« Reply #4 on: June 16, 2003, 07:50:14 am »

Quote
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
Logged
"It's called No Code because it's full of code. It's misinformation." - Eddie Vedder

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20062
Re: Help starting development
« Reply #5 on: June 16, 2003, 08:13:09 am »

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



Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
Re: Help starting development
« Reply #6 on: June 16, 2003, 12:46:01 pm »

Quote


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.
Logged

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
Re: Help starting development
« Reply #7 on: June 16, 2003, 12:49:25 pm »

Quote
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.
Logged

NoCodeUK

  • Citizen of the Universe
  • *****
  • Posts: 1820
Re: Help starting development
« Reply #8 on: June 16, 2003, 12:52:11 pm »

I would use C++ if I could understand it ;D

One of these days I will take a course but until then...

Adam
Logged
"It's called No Code because it's full of code. It's misinformation." - Eddie Vedder

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20062
Re: Help starting development
« Reply #9 on: June 16, 2003, 01:48:23 pm »

>> 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.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20062
Re: Help starting development
« Reply #10 on: June 16, 2003, 01:49:44 pm »

>> 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...
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

mattsnuts

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 82
  • that'll do
Re: Help starting development
« Reply #11 on: June 16, 2003, 03:57:21 pm »

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
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20062
Re: Help starting development
« Reply #12 on: June 16, 2003, 04:03:55 pm »

>> 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!



Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio, Music
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

NoCodeUK

  • Citizen of the Universe
  • *****
  • Posts: 1820
Re: Help starting development
« Reply #13 on: June 17, 2003, 09:29:52 am »

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
Logged
"It's called No Code because it's full of code. It's misinformation." - Eddie Vedder

RhinoBanga

  • Citizen of the Universe
  • *****
  • Posts: 1703
  • Developer
Re: Help starting development
« Reply #14 on: June 17, 2003, 09:51:41 am »

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.
Logged

NoCodeUK

  • Citizen of the Universe
  • *****
  • Posts: 1820
Re: Help starting development
« Reply #15 on: June 18, 2003, 03:49:29 am »

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
Logged
"It's called No Code because it's full of code. It's misinformation." - Eddie Vedder

Soundman

  • Regular Member
  • World Citizen
  • ***
  • Posts: 155
  • Go Music!
Re: Help starting development
« Reply #16 on: June 19, 2003, 07:32:36 pm »

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.
Logged
Pages: [1]   Go Up