c# - VMWare API disconnect USB-Passthrough -


i using vmware workstation (v11) run virtual machine testing. i'd pragmatically add , remove usb-devices attached system.

using vmware.vim; can connect server , query it. can remove devices cd-drives , other things. can't disconnect usb-passthrough-device. either : "invalid config" or "unknown error" (most due lib being interopt , not transporting information)

my current code:

using vmware.vim; var dongle =  devs.singleordefault(i => i.deviceinfo.summary.contains("silicon")); if (dongle != null) {     var usbdongle = (dongle virtualusb);     usbdongle.connected = false;      var spec = new virtualmachineconfigspec() {         devicechange = new[] {                                                                              new virtualdeviceconfigspec() {                                                     device = dongle,                 operation = virtualdeviceconfigspecoperation.remove,             }         }     };      vm.reconfigvm(spec); 

neither operation = "remove" or "edit" has effect. i'm getting kind of error...

i appreciate ideas!

regards,

corelgott


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -