I'm having an interesting problem regarding a machine vision camera, a dll, a host application, and CodeBlocks.
I have a dll that enumerates Matrix Vision cameras, and directs calls from a host application to whichever camera the host application is addressing.
I have a bluefox-IGC camera that I'll refer to as the SD camera and a BlueFox3-1100C camera that I'll refer to as the HD camera.
In the dll, the first thing to be done is to create a new DeviceManager (a Matrix-Vision class) and ask it how many devices are connected:
FDeviceManager =new DeviceManager;
// Check to see if any devices are currently connected.
Count =FDeviceManager->deviceCount();
if ( Count == 0)
{
OutputDebugStr("WARNING: No cameras found by camera driver.");
return CAM_FAILURE;
}
When I run the host application from Windows File Manager, both the SD and HD camera will be found. If only 1 SD camera is present, Count = 1. If only 1 HD camera is present, Count = 1. If one of each is present, Count = 2. No problems.
However, if I run the host application from the CodeBlocks IDE, no HD cameras are ever found. So, 1 SD Camera -> Count = 1. 1 HD Camera -> Count = 0. 1 SD + 1 HD -> Count = 1.
I'm not even sure what direction to look in here.
Since the IDE clearly runs the host application in the IDE's memory space, I could see this being a problem with CodeBlocks.
Has anyone seen any disparate behavior like this before?
Here are some quick stats:
- OS is Windows 7 Pro 64-bit SP1
- Host application is 32-bit, compiled with TDM-GCC-32
- dll is 32-bit, compiled with TDM-GCC-32
If any more information is needed, just ask.