CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2010
    Posts
    2

    Kill a process VB.NET 2008 Windows Mobile

    I have VB.net 2008 with 3.5. I also have Windows Mobile 6 SDK and 6.5 SDK. I am having an issue killing an external process with my app. I have searched and tried numerous bits of code and none seem to work for Mobile. I keep seeing GetProcessByName but that is not an option for Windows Mobile. I know the process exe but the PID changes so I cannot hard code that. I cannot seem to get the code right to find the exe and kill it. Any help with this would be appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Kill a process VB.NET 2008 Windows Mobile

    Have you tried this?
    Code:
    Dim instance As Process
    
    instance.Kill()
    http://msdn.microsoft.com/en-us/libr...cess.kill.aspx
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Mar 2010
    Posts
    2

    Re: Kill a process VB.NET 2008 Windows Mobile

    Quote Originally Posted by dglienna View Post
    Have you tried this?
    Code:
    Dim instance As Process
    
    instance.Kill()
    http://msdn.microsoft.com/en-us/libr...cess.kill.aspx
    I guess the problem i have with that is how do i specify which process to kill?

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Kill a process VB.NET 2008 Windows Mobile

    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Kill a process VB.NET 2008 Windows Mobile

    The platforms mentioned in the link do not include versions of Windows CE or Windows mobile. I think the problem the OP is having is that this is not supported in the compact framework.

  6. #6
    Join Date
    Mar 2010
    Posts
    2

    Re: Kill a process VB.NET 2008 Windows Mobile

    Quote Originally Posted by DataMiser View Post
    The platforms mentioned in the link do not include versions of Windows CE or Windows mobile. I think the problem the OP is having is that this is not supported in the compact framework.
    This is correct. GetProcessByName does not work with Windows Mobile. I need an alternative to that to kill a certain process either by name or by finding the PID of the process and then killing it that way.

  7. #7
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Kill a process VB.NET 2008 Windows Mobile

    Maybe this could be of use to you.
    http://blog.xeviox.com/wordpress/?p=126

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured