You should take a look at the Media Center SDK for this information. I
believe it can be done, and here is an excerpt from the help files:
Initializing and Running an Add-in
All Media Center add-ins must implement two interfaces: IAddInModule and
IAddInEntryPoint. These interfaces expose methods that are called by Media
Center. The add-in must also inherit from MarshalByRefObject since Media
Center uses .NET Remoting to communicate with the add-in.
The IAddInModule interface exposes the Initialize and Uninitialize methods.
Initialize is the first method that Media Center calls when it loads the
add-in, giving the add-in an opportunity to initialize internal variables and
obtain any system resources that it needs.
After calling IAddInModule.Initialize, Media Center calls an add-in's
IAddInEntryPoint.Launch method, passing an instance of the AddInHost object
to the add-in. This object enables the add-in to access objects in the
Microsoft.MediaCenter.AddIn and Microsoft.MediaCenter.Extensibility
namespaces to retrieve information about Media Center and to control certain
aspects of the Media Center experience.
The AddInHost object is guaranteed to be valid only until the Launch method
returns. Therefore an add-in must make all calls to the Media Center API
within the context of the Launch method. Attempting to call the AddInHost
object after the Launch method returns can result in a fatal error. Multiple
threads spawned by the Launch method must be terminated before the Launch
method returns.
On-demand add-ins behave in a modal fashion. An on-demand add-in can retain
control of Media Center until its Launch method returns. Media Center unloads
an add-in when its Launch method returns. Use an on-demand add-in to perform
short, discrete tasks only. For all other tasks, use a background add-in.
Before terminating an add-in, Media Center calls the add-in's
IAddInModule.Uninitialize method and then briefly waits for the add-in to
save its state, terminate any threads it created, and free any other system
resources that it may have allocated. If the add-in's Uninitialize method
does not return quickly enough, Media Center unloads the add-in's application
domain, terminating the add-in.
You should assume that your add-in can be interrupted at any time (for
instance, if the user closes Media Center). Design the add-in to perform
lengthy operations in small steps, saving its state after each step if
necessary. Using this approach, the add-in can continue if it was previously
interrupted.
If your application needs a more deterministic environment, you should
implement the application as an executable program that runs outside of Media
Center and use a helper add-in to manipulate the Media Center aspects of the
application.
"keerthana_m_2003@yahoo.com" wrote: