C# EDSDK get Connected cams
public List<IntPtr> GetConnectedCams()
{
List<IntPtr> devices = new List<IntPtr>();
IntPtr cameraList;
uint err = EDSDK.EdsGetCameraList(out cameraList);
if (err == EDSDK.EDS_ERR_OK)
{
int count;
err = EDSDK.EdsGetChildCount(cameraList, out count);
for (int i = 0; i < count; i++)
{
IntPtr cam;
err = EDSDK.EdsGetChildAtIndex(cameraList, i, out cam);
EDSDK.EdsDeviceInfo info;
err = EDSDK.EdsGetDeviceInfo(cam, out info);
devices.Add(cam);
}
}
return devices;
}