Windows > Plug-in Development
COM/Ole Automation No Worky
earache:
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?
Nikolay:
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
earache:
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 :)
JeffreyK:
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
earache:
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?
Navigation
[0] Message Index
[#] Next page
Go to full version