开发者

Required help in getting logged volumes

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜