PDA

View Full Version : Use of IC imaging Control in DLL



Unregistered
December 19, 2002, 09:09:42
Hello,

our machine vision platform requires an interface DLL for translating its standard acquisition commands into something the device understands. When trying to use Grabber::getAvailableVideoCaptureDevices, we run into the swap-command in the operator= of the smart_ptr class and get an assertion failure in dbgheap.c, line 1011, at _CrtIsValidHeapPointer(pUserData). The identical code runs fine in your sample application.

Therefore, the question: are there known issues or things to watch, when using IC Imaging Control with an MFC-based DLL?

Regards

Peter Waszkewitz


This message was originally posted by Peter Waszkewitz in the old IC Imaging Control Support Forum.

Unregistered
December 20, 2002, 16:30:31
Hello,

You have to use the MFC that comes with VC6. The VC7 version will not work.

You need to use MFC in a Shared DLL.

Best regards
Johannes
IC Support


This message was originally posted by IC Support in the old IC Imaging Control Support Forum.

Unregistered
December 20, 2002, 17:19:02
Hello Johannes,

thank you for the info. It is VC6, however, the EXE I'm connecting you does not like DLLs using shared MFC very much, therefore we usually link MFC statically.

Would it help not using MFC at all?

Regards

Peter


This message was originally posted by Peter Waszkewitz in the old IC Imaging Control Support Forum.

Unregistered
January 7, 2003, 13:00:52
Hello,

we tried the following combinations:

EXE linked to shared MFC: finds FireWire device
EXE loading DLL linked to shared MFC: crashes with heap corruption
EXE loading DLL linked to static MFC: crashes with heap corruption
EXE loading DLL not using MFC: crashes with heap corruption

and we did use AFX_MANAGE_STATE when using the shared MFC.

What do we have to do to us IC Imaging Control from within a DLL which is dynamically loaded by an executable?

Regards

Peter


This message was originally posted by Peter Waszkewitz in the old IC Imaging Control Support Forum.

Unregistered
January 7, 2003, 13:06:15
Hello,

Please sttrip your project down to only the components that are necessary to demostrate the problem and zip the entore project into a file. Please send this zip with a short decription to:

support@imagingcontrol.com

Best regards
Johannes
IC Support


This message was originally posted by IC Support in the old IC Imaging Control Support Forum.

Unregistered
January 8, 2003, 09:59:46
Both problems (load failure when grabber object is globally static in DLL and heap corruption with getAvailableVideoCaptureDevices()) have been solved by advice from IC support to always link debug versions with the IC-Imaging Debug DLLs, release versions with release DLLs.

Thank you

Peter Waszkewitz


This message was originally posted by Peter Waszkewitz in the old IC Imaging Control Support Forum.