开发者

Required help in getting logged volumes

开发者 https://www.devze.com 2023-02-28 07:32 出处:网络
I am trying to get description ManagementScope scope = ((WindowsOrc)m_ParentOrc).ConnectWmiScope(\"root\\\\WMI\");

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消