INTERACT FORUM

Please login or register.

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

Author Topic: COM/Ole Automation No Worky  (Read 4690 times)

earache

  • Regular Member
  • Recent member
  • *
  • Posts: 5
  • nothing more to say...
COM/Ole Automation No Worky
« on: October 08, 2003, 12:32:15 am »

Maybe I'm a total idiot, but I've tried both Delphi 7 and C#/.NET to control Media Center via out of process automation.

In both environments I get a "Class not registered" error, or one of a similar nature.

Am I missing something?  Do I have to regsvr32 something?
Logged

Nikolay

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1681
  • Former CTO, JRiver, Inc.
Re: COM/Ole Automation No Worky
« Reply #1 on: October 08, 2003, 05:26:51 am »

earache,

You receive the message because you are trying to use GetActiveObject. If you receive the error from the function call CreateInstance.

For more info see MJAutomation documentation:
http://www.musicex.com/mediacenter/DevZone/MJAutomation.html

Nikolay
Logged

earache

  • Regular Member
  • Recent member
  • *
  • Posts: 5
  • nothing more to say...
Re: COM/Ole Automation No Worky
« Reply #2 on: October 08, 2003, 09:56:26 am »

I get it both ways.

In delphi,

var test:Variant;

test=CreateOleObject("MediaJukebox Application");

That yeilds a "Invalid class string".  Doing it with GetActiveOleObject() gets the same error.

In C#, I've used the standard:

IMJAutomation mj=new MJAutomation();

and

IMJAutomation mj=(IMJAutomation)System.Runtime.InteropServices.Marshal.GetActiveObject("MediaJukebox Application");

Both yielding in class not registered errors.  I suspect this is a registry issue?  I dunno.  I'm confused.

Thanks :)
Logged

JeffreyK

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 52
  • nothing more to say...
Re: COM/Ole Automation No Worky
« Reply #3 on: October 08, 2003, 01:50:47 pm »

What build of MediaCenter are you using?

Have you tried rebooting the machine?  I have run into errors before with OLE that go away with a reboot (especially just after installing new software or running into a crash in an app using OLE).

-JeffreyK
Logged

earache

  • Regular Member
  • Recent member
  • *
  • Posts: 5
  • nothing more to say...
Re: COM/Ole Automation No Worky
« Reply #4 on: October 08, 2003, 04:45:03 pm »

Media Center Registered 9.0.180

I've tried rebooting, but no go.  Wondering if I should re-install it.  

I've scanned my registry for MediaCenter but there is nothing that indicates any type of OLE Automation Server has been registered.  

Are there registry settings I should try?
Logged

earache

  • Regular Member
  • Recent member
  • *
  • Posts: 5
  • nothing more to say...
Re: COM/Ole Automation No Worky
« Reply #5 on: October 08, 2003, 05:08:20 pm »

Installed the update and everything is working cool now.  I think my problem is that when I reinstalled XP after a nasty system crash, I just copied the folder over and didn't reinstall.

Thanks! :)
Logged

JeffreyK

  • Regular Member
  • Junior Woodchuck
  • **
  • Posts: 52
  • nothing more to say...
Re: COM/Ole Automation No Worky
« Reply #6 on: October 09, 2003, 06:34:42 am »

The problem was that .180 didn't have the out of proc automation - that was added during the development of 9.1.

Glad things are working!
-JeffreyK
Logged

earache

  • Regular Member
  • Recent member
  • *
  • Posts: 5
  • nothing more to say...
Re: COM/Ole Automation No Worky
« Reply #7 on: October 09, 2003, 07:00:27 am »

That might explain things too ;)

Incidentally, since I got it working once, it hasn't worked since.  Even after a reboot.  I think my machine is just hosed.

Logged
Pages: [1]   Go Up