ManagementClass getting HRESULT: 0x80010002 error

2

My app is getting this error on Windows 7. Does the " Windows Management Instrumentation" service need to be is started on the computer for this class? Any ideas?

BTW, this code runs fine on my computer -- So the code does work. A remote user is getting this error.

Void Initialize()... Call was canceled by the message filter. (Exception from HRESULT: 0x80010002 (RPC_E_CALL_CANCELED)) ... ...
at System.Management.ManagementScope.Initialize() at System.Management.ManagementObject.Initialize(Boolean getObject) at System.Management.ManagementClass.GetInstances(EnumerationOptions options)

The offending C# code is this

ManagementClass mc = new ManagementClass(
            "Win32_LogicalDisk");
        ManagementObjectCollection moc = mc.GetInstances();
c#
.net
asked on Stack Overflow Mar 8, 2014 by LT Dan • edited Jun 27, 2016 by Uwe Keim

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0