INTERACT FORUM
Windows => Plug-in Development => Topic started by: earache 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?
-
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
-
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 :)
-
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
-
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?
-
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! :)
-
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
-
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.