Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# WMI硬件地址和IRQ_C#_Wmi_Memory Address_Irq - Fatal编程技术网

C# WMI硬件地址和IRQ

C# WMI硬件地址和IRQ,c#,wmi,memory-address,irq,C#,Wmi,Memory Address,Irq,有人能帮我找到一个WMI方法来检索硬件地址和IRQ吗 到目前为止,我所查看的类在告诉您什么设备实际在使用资源方面似乎有点空,但如果在Windows“系统信息”工具下可用,则必须有可能 最后,我想在我的C#应用程序中创建一个地址映射和一个IRQ映射 我简要介绍了以下课程: Win32_设备存储器地址 Win32_IRQResource 就在这一秒,我看到了另一个,但我还没有真正研究它: Win32_AllocatedResource 也许将其与Win32_pPentity?配对?要获得该信

有人能帮我找到一个WMI方法来检索硬件地址和IRQ吗

到目前为止,我所查看的类在告诉您什么设备实际在使用资源方面似乎有点空,但如果在Windows“系统信息”工具下可用,则必须有可能

最后,我想在我的C#应用程序中创建一个地址映射和一个IRQ映射

我简要介绍了以下课程:

  • Win32_设备存储器地址
  • Win32_IRQResource
就在这一秒,我看到了另一个,但我还没有真正研究它:

  • Win32_AllocatedResource

也许将其与Win32_pPentity?配对?

要获得该信息,您必须使用WQL语句在 ->->课程

检查此示例应用程序

using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMIIRQ
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach(ManagementObject Memory in new ManagementObjectSearcher(
                "select * from Win32_DeviceMemoryAddress").Get())
            {

                Console.WriteLine("Address=" + Memory["Name"]);
                // associate Memory addresses  with Pnp Devices
                foreach(ManagementObject Pnp in new ManagementObjectSearcher(
                    "ASSOCIATORS OF {Win32_DeviceMemoryAddress.StartingAddress='" + Memory["StartingAddress"] + "'} WHERE RESULTCLASS  = Win32_PnPEntity").Get())
                {
                    Console.WriteLine("  Pnp Device =" + Pnp["Caption"]);

                    // associate Pnp Devices with IRQ
                    foreach(ManagementObject IRQ in new ManagementObjectSearcher(
                        "ASSOCIATORS OF {Win32_PnPEntity.DeviceID='" + Pnp["PNPDeviceID"] + "'} WHERE RESULTCLASS  = Win32_IRQResource").Get())
                    {
                        Console.WriteLine("    IRQ=" + IRQ["Name"]);
                    }
                }

            }
            Console.ReadLine();
        }
    }
}

要获得该信息,必须使用WQL语句在 ->->课程

检查此示例应用程序

using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMIIRQ
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach(ManagementObject Memory in new ManagementObjectSearcher(
                "select * from Win32_DeviceMemoryAddress").Get())
            {

                Console.WriteLine("Address=" + Memory["Name"]);
                // associate Memory addresses  with Pnp Devices
                foreach(ManagementObject Pnp in new ManagementObjectSearcher(
                    "ASSOCIATORS OF {Win32_DeviceMemoryAddress.StartingAddress='" + Memory["StartingAddress"] + "'} WHERE RESULTCLASS  = Win32_PnPEntity").Get())
                {
                    Console.WriteLine("  Pnp Device =" + Pnp["Caption"]);

                    // associate Pnp Devices with IRQ
                    foreach(ManagementObject IRQ in new ManagementObjectSearcher(
                        "ASSOCIATORS OF {Win32_PnPEntity.DeviceID='" + Pnp["PNPDeviceID"] + "'} WHERE RESULTCLASS  = Win32_IRQResource").Get())
                    {
                        Console.WriteLine("    IRQ=" + IRQ["Name"]);
                    }
                }

            }
            Console.ReadLine();
        }
    }
}

您使用的是哪种语言?C#,但只要我知道要查找哪些类来运行/SQL语句,我就可以使用自定义框架很好地提取WMI数据。您使用的是哪种语言?C#,但只要我知道要查找哪些类来运行/SQL语句,我就可以使用自定义框架很好地提取WMI数据。天哪,这实际上在我第一次调试时就起作用了,即使是在重新排列它之后。看起来将硬盘与其智能数据链接在一起也很有用。谢谢好吧,也许不是。DiskDrive位于CIMV2命名空间中,MSStorage Driver_ATAPISmartData位于WMI命名空间中,我的话,这会花很长时间到计算机上!天哪,这在我第一次调试时就起作用了,即使是在把它重新排列好之后。看起来将硬盘与其智能数据链接在一起也很有用。谢谢好吧,也许不是。DiskDrive位于CIMV2命名空间中,MSStorage Driver_ATAPISmartData位于WMI命名空间中,我的话,这会花很长时间到计算机上!