Open() works only on specific computers


I have written a Program with your c++ API, which works fine so far. I finally wanted to test it on the
Computers of my Coworkers, but it does not seem to work there. The specific code which fails is simply this:

Cvb::String path(CVB_LIT("%CVB%/drivers/"));
path = Cvb::ExpandPath(path);
auto device = Cvb::DeviceFactory::Open(path);

This results in C-Api Call Failure (Load Image File).

How do i go about solving this problem?

Thank you very much for your help

A few questions:

  • Is CVB installed properly on the system in question?
  • Is the same CVB version (also 32/64bit) and bindings preview installed on the system in question? (bindings preview only applies if the installed CVB version is older than 13.02.000)
  • Is the properly configured on the systems in question?
  • Is the camera connected properly and working? (this and the previous question can be verified by loading the in CVB Viewer for instance)
  • Is the %CVB% environment variable set properly on the system in question?

thank you for your quick response:

on both Systems CVB Version 13.01.006 (64bit) is installed.

The camera is properly connected and working on both computers (We can receive a Videostream just fine with the CVB Device Configurator). Because of that i think CVB is installed properly.

The environment variables seem to be set up correcly, specifically the variable CVB is pointing to the standard installation path C:\Program Files\STEMMER IMAGING\Common Vision Blox\

If your %CVB% questions is related to this line,

Cvb::String path(CVB_LIT("%CVB%/drivers/"));

I have also tried giving the open function the complete path, which also did not help.

I am not so sure if is properly configured on both Systems however.

Hi @F_E

When opening the directly, it is necessary to have a configuration for it stored in the file GenICam.ini (which is located in the directory %CVBDATA%\Drivers). From what you describe, I would guess that on the computer where your code works, this file has been generated, but not on the PC of your coworker. The device configurator and/or GenICam Browser are capable of opening devices without a previously generated config file (and in fact are both able to create one).

Can you compare the GenICam.ini file from both computers? If they differ: If the camera is on a fixed IP which is reachable from both PCs it might be sufficient to copy the GenICam.ini from the working unit to the other unit (or, of course, create one with e.g. the GenICam Browser). If you have changed network adapter settings on your machine (e.g. by configuring Jumbo Packets) it might also be necessary to replicate those to the other machine.

Hi @illusive, I have just tried copying my GenICam.ini file from the working computer to the non-working computer and it unfortunately did not make a difference. I am trying to look into what differences we have on our network adapter settings…

Edit: we created identical network adapter settings and it still would not work

Edit2: One difference in both computers is what the device configurator can find.
In the GenICam Device Tree window under SI GEV TL there are more entries on the working computer.
There are 2 (identical) Filter Driver entries and 2 (identical) Socket Driver entries. There is only one Filter and one Socket Driver entrie each on the non-working computer.

The files will definetly be different. You will probably have different cameras and definetly different network cards. You need to discover the camera with the GenICam Browser and then save the configuration. This needs to be done on each PC.

Or better you use the discover API in your app:

auto interfaceInfoList = Cvb::DeviceFactory::Discover();
if (interfaceInfoList.empty())
auto camera = Cvb::DeviceFactory::Open(interfaceInfoList[0].AccessToken());
1 Like

Also as you seem to just get started with your app I recommend updating to :cvb: 13.02.000:


The problem is now resolved, thank you for your help.

The problem was in fact related to the location of the CVB DLL files and was not a network issue.