How to kill Tmail process RRS feed

  • 问题

  • In my program I started the Tmail process,then when I want to return last UI ,I wish to kill process,

    how can i do that, any help?

    my code C#:

    //start tmail

    m_MsgProcess = Process.Start("tmail.exe", "-transport \"SMS\" -to \"" + m_msgCenter + "\" -body \"" + msg + "\"");///A




    //kill tmail

    if (!m_MsgProcess.HasExited) ///B
         // Close process by sending a close message to its main window.
       // Free resources associated with process.


    is there anything wrong with my code here?

    I can't kill the Tmail process ,because "A" and "B" step cause an Win32Exception.

    I watch the Exception,and find that was called by HasExited and Exited property of Tmail process


    //I'm programing for smartphone with C#

    2008年12月4日 6:33