Windows Entertainment and Connected Home

How to organize, access and enjoy all of your media in and around your home

Closing / Exit an Extender Session programmatically

  • rated by 0 users
  • This post has 1 Reply |
  • 1 Follower
Page 1 of 1 (2 items)
  •  
    Hi, 

    I would like to exit an Extender Session. I didn´t find an API Call for it. 
     

    What i tested so far: -
    using Windows Close-Function on a XBox 360 Extender Session
     

    Result:
    the Session is closed, all related MCX1 User Tasks on the Host are closed, but, the XBox capture this raw method an brings up an Dialog, if the Session should be restarted. unfortunately  it has an auto Restart timeout. so if you don’t answer it will start again a new extender session. 

    - SendKeys Function 
    the next approach was to check if we could navigate to the exit option using the sendkeys function. unfortunately we are able to navigate to the start page, but not to a static, predefined point like extras, from this point it would be easy to navigate with sendkeys. but we didn’t find a way to set focus to a fix point, it always remembers the last focus position. 

    Questions:
    Is there an public API-Call available to exit a session ? 
    if not, is it possible with a reflection call ?
    What dll / method name is used ?
       

    Please help, Thanks, 

    DanB#

     Edit:

    I forgot to mention that i also tried to find the entrypoint of the close function (LaunchEntryPoint) and i also had a look at NavigateToPage, but i have no PageID for it.
      
  •  

    Hmm, I'm sure there are easier ways like killing the user's session but the CloseCommand (ehshell, MediaCenter.Home.CloseCommand) calls PageBasedUCPService.DefaultUCP.RequestClose(FormCloseReason.UserRequest). I guess you could start fishing there. Damian Mehers has an injection example illustrating how to get the DefaultUCP which you could then call RequestClose through reflection.

    Probably the bigger question is why do you need to do this?

Page 1 of 1 (2 items)