自动启动中的应用程序-驱动程序的加载完成了吗? [英] application in autostart - loading of drivers finished?

查看:82
本文介绍了自动启动中的应用程序-驱动程序的加载完成了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好专家,

我的应用程序从开始菜单的自动启动文件夹启动.有时,由于尚未加载驱动程序,启动被阻止.

我的应用程序如何确定启动时是否已加载驱动程序?然后,我可以等待一段时间,然后重试.

以下代码应列出所有可用的服务和驱动程序:

Hello Experts,

my application starts from start menu''s autostart folder. At times, the startup is blocked because a driver is not yet loaded.

How can my application possibly determine if the driver is loaded at the moment of starting? I could then wait for some time and try again.

The following code should list all available services and drivers:

System.ServiceProcess.ServiceController[] scServices = System.ServiceProcess.ServiceController.GetDevices();



MSDN说,名称空间"System.ServiceProvider"由dll"System.ServiceProcess.dll"提供.该文件在我的PC上不存在,即使MSDN也说应从.NET 1.0开始将其包括在内.
我应该从其他地方下载dll吗?
还有其他更简单的主意吗?

此致,


luker



MSDN says that namespace "System.ServiceProvider" is provided by dll "System.ServiceProcess.dll". This file doesn''t exist on my PC, even though MSDN also says that it should be included since .NET 1.0.

Am I supposed to download the dll from elsewhere?
Anyone another, easier idea?

Sincearely,


luker

推荐答案

我可能很愚蠢地要求您重新查找系统中该特定dll的路径.我使用了您的代码行,为此,当我不得不添加引用时,我发现这是系统中"System.ServiceProcess.dll"所在的路径,

"C:\ windows \ Microsoft.NET \ Framework \ v2.0.50727 \ System.ServiceProcess.dll"

如果您没有该dll,这真是令人惊讶,因为在我看来,它确实应该作为框架的一部分存在于您的系统中.

注意:我的系统是带有XP-SP3的.NET 2.0.
I might be silly asking you to rechek the path in your system for that specific dll. I used your code line and for that when I had to add reference , I found this is the path in system where "System.ServiceProcess.dll" resides,

"C:\windows\Microsoft.NET\Framework\v2.0.50727\System.ServiceProcess.dll"

This is surprising in case you don''t have that dll as it seems to me that indeed it should have been in your system as a part of the framework.

NB: I having my system .NET 2.0 with XP-SP3.


您是否在项目中包含了适当的引用?
Did you include the appropriate reference in your project?


感谢Arindam Tewary的答案,我找到了必要的dll. WindowsExplorer的搜索(F3)功能似乎似乎不可见.

将其手动添加到我的项目后,一切正常.
Thanks to Arindam Tewary''s answer, I found the necessary dll. It just doesn''t seem to be visible to WindowsExplorer''s search (F3) feature.

After adding it to my project manually, everything went fine.


这篇关于自动启动中的应用程序-驱动程序的加载完成了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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