# AutoSwitchEnable stopped working !?

**URL:** <https://forum.commonvisionblox.com/t/autoswitchenable-stopped-working/186>\
**Category:** C-style API\
**Tags:** cpp, genicam, autoswitch\
**Created:** [August 2, 2017, 10:53pm UTC](https://forum.commonvisionblox.com/t/autoswitchenable-stopped-working/186 "2017-08-02T22:53:59Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![parsd](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.commonvisionblox.com/parsd/32/7_2.png) [@parsd](https://forum.commonvisionblox.com/u/parsd)\
**Post date:** [August 3, 2017, 1:52pm UTC](https://forum.commonvisionblox.com/t/autoswitchenable-stopped-working/186/7 "2017-08-03T13:52:31Z")

</div>

For automatic device detection you can use

```auto
[SYSTEM]
CreateAutoIni=1

```

After loading the driver you can query the number of devices via `CS2GetNumPorts`. But for this you need to be able to load the GenICam.vin. But be careful if you are automatically discovering devices: the _GenICam.vin_ will detect GigE Vision cameras twice on _Windows_ operating systems:

1. Filter Driver
2. Socket Driver

You would need to filter the GenICam.ini manually.

For opening GenICam-devices you can use the function I proposed here:  
[https://forum.commonvisionblox.com/t/old-image-broken-after-setting-new-camport/66/5?u=parsd](https://forum.commonvisionblox.com/t/old-image-broken-after-setting-new-camport/66/5)

---

_[View the full topic](https://forum.commonvisionblox.com/t/autoswitchenable-stopped-working/186)._
