I am trying to get description
ManagementScope scope = ((WindowsOrc)m_ParentOrc).ConnectWmiScope("root\\WMI");
ObjectQuery testquery = new ObjectQuery("SELECT * FROM MPIO_GET_DESCRIPTOR");
ManagementObjectSearcher desc = new ManagementObjectSearcher(scope, testquery);
mpiodescinstance开发者_开发知识库s = desc.Get();
Above query work properly for 32bit machine, but it is not working for 64bit machine.
Regards, NewDev
I had the same puzzle at my work. With the almost same code segment, I got a ManagementException
saying "Invalid Class"
.
It turned out that until an MPIO device is configured and a volume is connected, MPIO_GET_DESCRIPTOR WMI class won't be loaded(?)/instantiated. Hope this helps.
精彩评论