Question:

- How to open specific camera by using API? 


Answer:

- Refer to programming guild document, advanced topic, Creating specific cameras.
- There is a sample code for Gige cameras. For usb camera, can do it by using serial number.

CTlFactory& TlFactory = CTlFactory::GetInstance();
CDeviceInfo di;
di.SetSerialNumber( "20399956");
di.SetDeviceClass( Basler1394DeviceClass);
IPylonDevice* device = TlFactory.CreateDevice( di);


-The above example can also be written in one line: 

For example:

IPylonDevice* device = CTlFactory::GetInstance().CreateDevice( CDeviceInfo().SetDeviceClass( Basler1394DeviceClass).SetSerialNumber( "20399956"));