简体   繁体   中英

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);
mpiodescinstances = 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM