INTERACT FORUM

Please login or register.

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

Author Topic: Out of proc controller with C# / .NET  (Read 3233 times)

mi5

  • Regular Member
  • Recent member
  • *
  • Posts: 16
Out of proc controller with C# / .NET
« on: August 10, 2004, 09:51:30 pm »

Is anyone writing code for MC in C#?  I'd love to see
a simple example of external 'out of proc' control using
C# or even VB.NET.

Is the MCIO dll still required for doing this?

Logged

salsbst1

  • Regular Member
  • World Citizen
  • ***
  • Posts: 244
Re:Out of proc controller with C# / .NET
« Reply #1 on: August 11, 2004, 01:01:21 pm »

I have been working on a C#-based web server as an interface plug in.  It's purpose is to expose the entire COM API via HTTP.  It's almost finished (alpha probably completed tonight). It's at:

http://cvs.sourceforge.net/viewcvs.py/sageplugins/MC/HTTP/

I honestly don't know what MCIO dll is, so I can't really answer your question.
Logged

dhill

  • Regular Member
  • Recent member
  • *
  • Posts: 16
  • Has anyone seen the bridge?
Re:Out of proc controller with C# / .NET
« Reply #2 on: August 12, 2004, 12:11:26 am »

No MCIO is no longer required.

Logged

mi5

  • Regular Member
  • Recent member
  • *
  • Posts: 16
Re:Out of proc controller with C# / .NET
« Reply #3 on: August 13, 2004, 10:34:02 am »

No MCIO is no longer required.


It appears that it might still be required for use with .NET.
Out-of-proc test programs run once, but bomb the next time
they are exec'd.   At least this is the case for v10.  Has
this changed with the v11 betas?

I'd also like to find out if custom ID3 fields can be retrieved
via the COM interface.  They are present in exported XML,
but don't appear via the IMJFilesAutomation interface.
Matt?  Anyone?


Logged

salsbst1

  • Regular Member
  • World Citizen
  • ***
  • Posts: 244
Re:Out of proc controller with C# / .NET
« Reply #4 on: August 13, 2004, 10:41:41 am »

I've had issues where MC wasn't shutting down cleanly when launched through Automation.  Next time you are ready to try the 2nd run to see if it bombs, check your task manager just prior and see whether MediaJukebox.exe is in there.

Since .Net has a different memory management scheme than COM, you may need to tinker with the release and shutdown stuff.
Logged

mi5

  • Regular Member
  • Recent member
  • *
  • Posts: 16
Re:Out of proc controller with C# / .NET
« Reply #5 on: August 13, 2004, 09:23:35 pm »

I've had issues where MC wasn't shutting down cleanly when launched through Automation.  Next time you are ready to try the 2nd run to see if it bombs, check your task manager just prior and see whether MediaJukebox.exe is in there.

Since .Net has a different memory management scheme than COM, you may need to tinker with the release and shutdown stuff.

Oops...Not sure why that last message posted before I had
a chance to edit it.

Good idea about the task manager.  MCIO doesn't need to
unload and reload MC, and I expected that MC's direct access method would also use the currently loaded MC instance.

Yeah, it's difficult to tell when .NET gives back references,
and I thought that could be part of it.  But I also tried waiting
a while to give the mem manager time to clean up.

It would be nice to have an actual MediaCenter .NET assembly
rather than a wrapper around the COM object.

to

Logged

salsbst1

  • Regular Member
  • World Citizen
  • ***
  • Posts: 244
Re:Out of proc controller with C# / .NET
« Reply #6 on: August 14, 2004, 07:15:20 am »

It sounds like you'd like to always bind to an existing instance of MC rather than create your own.  If that is the case, then I think what you need is .Net's equivalent of VB's GetObject method: Marshal.BindToMoniker:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemRuntimeInteropServicesMarshalClassBindToMonikerTopic.asp
Logged

Lomax

  • Regular Member
  • Recent member
  • *
  • Posts: 6
  • Change this by choosing profile
Re:Out of proc controller with C# / .NET
« Reply #7 on: September 07, 2004, 07:43:27 am »


This project sounds really interesting, any developments?

Logged

salsbst1

  • Regular Member
  • World Citizen
  • ***
  • Posts: 244
Re:Out of proc controller with C# / .NET
« Reply #8 on: September 07, 2004, 03:39:21 pm »

Based on your other thread about remote control I suspect that you are talking about my project.  If that is the case then yes, I've completed a first draft of the HTTP server.  I'm still working out the final touches on client library that I will release for .Net and Java.   The client libraries are meant to hide the ugliness of the HTTP interface from the actual client apps.

If, on the other hand, you're not talking about my project, then sorry for the noise.
Logged
Pages: [1]   Go Up