.NET FE Application Process is not terminating. We use AxHost based Windows Media Player Component
The problems with Windows Media Player on a .NET CF based application are endless. In one of the .NET CF 3.5 applications, we are using ActiveX controls to play videos. The code for the media player ActiveX control is from [this MSDN article][1]. It had few memory leak problems, but the bugs are [sorted out with the help of this article][2]. 

The new problem - when we terminate the application, it closes the user interface but the process is running in the background. This is seen in Task Manager's Processes tab. This hanging process is making the system totally unstable. After playing a video for few yours, the entire system hangs and forces to reboot.

Please help me to understand why the process is hanging in background after closing and what fix in the code terminates the process completely.




  [1]: http://msdn.microsoft.com/en-us/library/aa446515.aspx
  [2]: http://blog.opennetcf.com/ctacke/2008/08/14/BugInMSDNActiveXHostingCode.aspx
.NET FE Application Process is not terminating. We use AxHost based Windows Media Player Component
===

The problems with Windows Media Player on a .NET CF based application are endless. In one of the .NET CF 3.5 applications, we are using ActiveX controls to play videos. The code for the media player ActiveX control is from [this MSDN article][1]. It had few memory leak problems, but the bugs are [sorted out with the help of this article][2]. 

The new problem - when we terminate the application, it closes the user interface but the process is running in the background. This is seen in Task Manager's Processes tab. This hanging process is making the system totally unstable. After playing a video for few yours, the entire system hangs and forces to reboot.

Please help me to understand why the process is hanging in background after closing and what fix in the code terminates the process completely.




  [1]: http://msdn.microsoft.com/en-us/library/aa446515.aspx
  [2]: http://blog.opennetcf.com/ctacke/2008/08/14/BugInMSDNActiveXHostingCode.aspx