locked
Problem using System.Diagnostics.Process for Pocket PC RRS feed

  • Question

  • Hello,


    I have problem using the "System.Diagnostic.Process" methods in Pocket Pc.


    My written code in C#.NET witch works perfectly in a regular PC having a .NET platform v.2 is:


    System.Diagnostics.Process[] ProcessList;

    string[] ExecutedProcList=null;

    ProcessList = System.Diagnostics.Process.GetProcesses();


    ExecutedProcList = new string[ProcessList.Length];


    for (int i = 0; i < ProcessList.GetLength(0); i++)

    {

    if (pName.ToLower() == "A process name")

    {

    //kill the specified process that has my given name

    ProcessListIdea.Kill();

    }

    }


    This piece of code returns a list of all running processes and kills the specified one but, it does not work at the pocket PC environment since I have not access to "Process.GetProcesses()" method in my pocket pc environment;


    The only methods I can access are:

    GetProcessById, GetCurrentProcess, and ReferenceEquals


    And I do not know how to use them to retrieve the list of all currently running processes.


    Please help me solve this problem.

    Thank you,


    Tuesday, March 27, 2007 3:39 PM

Answers

  • There's no Process.GetProcesses() on NETCF so you can't do that with Process class. See this for alternative solution.
    Tuesday, March 27, 2007 7:02 PM

All replies

  • Moving thread to correct forum.
    Tuesday, March 27, 2007 5:29 PM
  • There's no Process.GetProcesses() on NETCF so you can't do that with Process class. See this for alternative solution.
    Tuesday, March 27, 2007 7:02 PM