Quantcast
Channel: Kodi Community Forum - All Forums
Viewing all articles
Browse latest Browse all 84005

XBMC does not close using .NET Process.Close() \ CloseMainWindow()

$
0
0
Trying to 'gracefully' exit XBMC from an external .NET winforms app. I find it then try to close it using Process.Close() or Process.CloseMainWindow() (http://msdn.microsoft.com/en-us/library/ccf1tfx0.aspx), but it responds to neither. Only one that works is Process.Kill(). Close() \ CloseMainWindow() work with other things though, like Notepad.

Thoughts?


FindAndKillProcess("XBMC");

public bool FindAndKillProcess(string name)
{
foreach (Process clsProcess in Process.GetProcesses())
{
if (clsProcess.ProcessName.StartsWith(name))
{
//clsProcess.Close();
//clsProcess.CloseMainWindow();
clsProcess.Kill();
return true;
}
}
return false;
}

Viewing all articles
Browse latest Browse all 84005

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>