0

我有一些代码可以在标准 XP 系统上运行,但在 XP Embedded 测试机上失败。

我得到 System.Management.ManagementException :提供程序加载失败

这是我的代码:

    string query = "Select * From Win32_Printer";
    ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
    ManagementObjectCollection results = searcher.Get();

是否有要启动的服务或要注册的 DLL?

请帮我找出答案!

在此先感谢,跳蚤

4

1 回答 1

0

您必须检查System.Management.Instrumentation.dll图书馆是否正确注册。

试试这个链接

于 2010-09-22T16:17:59.377 回答