GetProcesses挂在XP上 [英] GetProcesses hangs on XP

查看:83
本文介绍了GetProcesses挂在XP上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

我无法让GetCurrentProcess()正常工作。

我想要完成的是列出所有正在运行的进程。但我的

电话得到GetProcesses()挂起。


在测试时我发现下面列出的小程序

挂起还有。


我错过了什么吗?


-tomas

// ----这个应用程序挂起----

使用System;

使用System.Diagnostics;


命名空间proctest

{


class Class1

{


[STAThread]

static void Main(string [] args)

{


Console.WriteLine(Process.GetCurrentProcess()。Proc essName);

}

}

}


// - 这段代码出了什么问题?

Hello All,
I''ma having trouble getting GetCurrentProcess() to work properly.
What I''m trying to accomplish is list all running processes. But my
call get GetProcesses() hangs.

While testing things out I found that the tiny program listed below
hangs as well.

Am I missing something?

-tomas
//---- This app hangs ----
using System;
using System.Diagnostics;

namespace proctest
{

class Class1
{

[STAThread]
static void Main(string[] args)
{

Console.WriteLine(Process.GetCurrentProcess().Proc essName);
}
}
}

// -- What''s wrong with this code?

推荐答案

Tomas,


获取流程信息可能需要一段时间。它很可能不会挂起,但只是你的

机器上运行了很多进程。


在任务管理器出现时,您会看到多少个进程?你让它运行,并试图让它完成吗?

-

- Nicholas Paldino [.NET / C#MVP] < br $> b $ b - mv*@spam.guard.caspershouse.com


Tomas Vera < TA ********** @ sbcglobalREMOVE.net>在消息中写道

新闻:8g ******************************** @ 4ax.com ...
Tomas,

Getting the process information can take a while. It''s most likely that
it is not hanging, but just you have a lot of processes running on your
machine.

How many processes do you see in task manager when it comes up? Have
you let it run, and attempted to let it finish?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tomas Vera" <ta**********@sbcglobalREMOVE.net> wrote in message
news:8g********************************@4ax.com...
Hello All,
我无法让GetCurrentProcess()正常工作。
我想要完成的是列出所有正在运行的进程。但是我的
电话会让GetProcesses()挂起。

在测试时我发现下面列出的小程序也挂了。

Am我错过了什么?

-tomas

// ----这个应用程序挂起----
使用System;
使用System.Diagnostics ;

命名空间测试
{Class class
{

[STAThread]
static void Main( string [] args)
{/>
Console.WriteLine(Process.GetCurrentProcess()。Proc essName);
}
}
}

// - 这段代码出了什么问题?
Hello All,
I''ma having trouble getting GetCurrentProcess() to work properly.
What I''m trying to accomplish is list all running processes. But my
call get GetProcesses() hangs.

While testing things out I found that the tiny program listed below
hangs as well.

Am I missing something?

-tomas
//---- This app hangs ----
using System;
using System.Diagnostics;

namespace proctest
{

class Class1
{

[STAThread]
static void Main(string[] args)
{

Console.WriteLine(Process.GetCurrentProcess().Proc essName);
}
}
}

// -- What''s wrong with this code?



Nicholas,

感谢您的回复。


大约有60个进程在运行。

我已经让应用程序等了大约4分钟。这是典型的吗?


感谢您的帮助。


-tomas

2005年10月13日星期四11 :38:07-0400,Nicholas Paldino [.NET / C#MVP]"

< mv*@spam.guard.caspershouse.com>写道:
Nicholas,
Thanks for your reply.

There are about 60 processes running.
I''ve let the app wait for about 4 minutes. Is this typical?

Thanks for your help.

-tomas
On Thu, 13 Oct 2005 11:38:07 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.com> wrote:
Tomas,

获取流程信息可能需要一段时间。它很可能不会挂起,但只是你的机器上运行了很多进程。

你在任务管理器中看到了多少个进程什么时候出现?有没有让它运行,并试图让它完成?
Tomas,

Getting the process information can take a while. It''s most likely that
it is not hanging, but just you have a lot of processes running on your
machine.

How many processes do you see in task manager when it comes up? Have
you let it run, and attempted to let it finish?






Tomas,


这是一个很好的进程数。你想从这些流程中获得什么信息?b $ b b b使用WMI可能更好。

-

- Nicholas Paldino [.NET / C#MVP]

- mv*@spam.guard.caspershouse.com


Tomas Vera < TA ********** @ sbcglobalREMOVE.net>在消息中写道

news:p3 ******************************** @ 4ax.com ...
Tomas,

That is a good number of processes. What information are you trying to
retreive from the processes? It might be better to use WMI instead.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Tomas Vera" <ta**********@sbcglobalREMOVE.net> wrote in message
news:p3********************************@4ax.com...
Nicholas,
感谢您的回复。

大约有60个进程在运行。
我让应用等待大约4分钟。这是典型的吗?

感谢您的帮助。

-tomas

On Thu,2005年10月13日11:38:07 -0400," ; Nicholas Paldino [.NET / C#MVP]"
< mv*@spam.guard.caspershouse.com>写道:
Nicholas,
Thanks for your reply.

There are about 60 processes running.
I''ve let the app wait for about 4 minutes. Is this typical?

Thanks for your help.

-tomas
On Thu, 13 Oct 2005 11:38:07 -0400, "Nicholas Paldino [.NET/C# MVP]"
<mv*@spam.guard.caspershouse.com> wrote:
Tomas,

获取流程信息可能需要一段时间。它很可能是
它没有悬挂,但只是你的机器上运行了很多进程。

你有多少进程什么时候看到任务管理器?你让它运行,并试图让它完成?
Tomas,

Getting the process information can take a while. It''s most likely
that
it is not hanging, but just you have a lot of processes running on your
machine.

How many processes do you see in task manager when it comes up? Have
you let it run, and attempted to let it finish?



这篇关于GetProcesses挂在XP上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆