api feedback

I would like to automate my VirtualHere client. For that I need feedback if adding a device to a client worked or not. I wasn't able to find out if that is possible with the command line api (windows). Do I need to run the client as a service?

Thanks for your help.

#2

You don't need to run it as a service.

Do this e.g for device at address "12345"

vhui64.exe -t "USE,123435"

Then call the command below and parse the output every second in a loop (with 5 sec timeout) until you find the line that contains that address 12345 and (In-use by you)

vhui64.exe -t "LIST"

#3

Thank for your help. How can I parse the output of the list command? As I am using the windows client it always starts a new window with the output data.

#6

Thank you very much. This helps a lot. I'd like to suggest another enhancement. Let's say I am starting the console application like this: vhui64.exe -t "USE,123435". The simplest way to check if I am connected to the device would be to provide an exit code:
0 -> Connected to device
1 -> Device is in use by another client
2 -> Device not found
...

What do you think?

#7

I think that its a good idea however it is not a synchronous process unfortunately so it may never return or return seconds later. Originally i thought about doing it this way but its not viable because everything is async in the program and server and its a complicated process when that command is issued. and it much simpler to poll the list command....