I am attempting to create a tool (C# console app) that will find a hardware device or camera that I specify with a GUID from the command line. I want the tool to then disable or enable the device/camera as specified by another command line argument.
I have two questions:
First, I believe I can find the device/camera by getting a list of items in the configuration:
var list = Configuration.Instance.GetItems(ItemHierarchy.SystemDefined);
And then searching down through that list and it’s children until I find the device or camera I want.
My first question is: Is there a faster way to find a device or camera by GUID without having to search down through the hierarchy like this?
Second question: Once I find the device/camera, I don’t know how to enable/disable it and save the new configuration.
I am pretty much a newbie when it comes to working with the SDK (not to mention C# itself) so I wonder if I am missing something fairly obvious.
I see some notes about how this can be done using the Power Shell tools but I would like to learn how to do it with a C# app if possible.
Thanks