LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CWIMAQBCGOptions

I've got to make some mods to a legacy VB6 app that's written using Imaq, NI-DAQ and ComponentWorks. There's no documentation about build environment.

I've installed VB6, NI-DAQ, IMAQ, NI-Vision and Measurement Studio into a VM running XP and can now load the project without it bailing out due to missing .ocx files etc. However there's methods and types that are unrecognised- initially, CWIMAQBCGOptions.

VB6's autocomplete does recognise "CWIMAQBCGOptions" but when I try and build/run the app I get a compile error "Can't find project or library". Google and NI's search give no hits. Anyone know what this is a component of, and what version I need to find?

So far I have Imaq 3.1.1, DaqMX/NIDAQ 7.4.0, Vision 6.1.0 and Measurement Studio 6.0.

It doesn't find its dependencies on loading the project on my normal work machine which has Measurement Studio 7 and recent NIDAQ and Vision so I'm assuming it's some obscure and old version that's needed.
0 Kudos
Message 1 of 4
(2,892 Views)

Hello,

I'll be taking a look into your issue, but you'll probably get a better return for your question on a more appropriate board.

Measurement Studio for VB6 or Machine Vision are probably your best bet.

Ill post back here with anything I can find on this issue. The best thing to do would be to make sure that the same Vision components are present on your previous development machine as your new development machine.

Cheers

Tom | NIUK

0 Kudos
Message 2 of 4
(2,869 Views)

Hello,

The CWIMAQBCGOptions function is part of Vision and is used to adjust the brightness, contrast, and gamma parameters.  Therefore, if this function is in fact responsible for the problem, then we need to take a closer look at whats happening when you include the Vision libraries into Visual Basic.

How do you know that this function is responsible for the compile error?  Have you taken steps to include the Vision libraries into your project?  One easy way to test if this is the case is to try and compile a simple program that uses any other Vision function to see if the same problem occurs.  Please provide any details on the error message that you are getting.  I have a useful guide for dissecting the error to help locate the cause listed below:

Vision Errors, and where to find help on them

  • nivision.h
    - Found in the following directory: C:\Program Files\National Instruments\Vision\Include
  • IMAQ Vision for LabVIEW VI Reference Help
    - Found in the following directory: C:\Program Files\National Instruments\Vision
  • IMAQ Vision for Visual Basic Reference Help
    - Found in the following directory: C:\WINDOWS\system32\cwimaq.chm
  • Example:
    - (LabVIEW) (-1074396077) ERR_INCOMP_TYPE - Incompatible image type
    - (VB) (Error 31083) ERR_INCOMP_TYPE - Incompatible image type
  • Range:
    - (LabVIEW) [-1074396160 through -1074395233] or [0xBFF60400 through 0xBFF6079F]
    - (VB) [30200 – 31927]

Before we progress any further we must make sure the other Vision functions behave as expected within your program. Also post back with a link to any other threads you may have created regarding this issue.

Cheers

Tom | NIUK

0 Kudos
Message 3 of 4
(2,847 Views)
I think I have it, thanks for the responses.

Regarding doing it on the original development PC- I wasn't the original coder, and don't have access to that PC- if it even still exists in the same form.

It seems to have been a combination of other unresolved dependencies which were causing VB to barf as soon as any external library call, and linking of the code to .dll and .ocx files that had been copied into the project directory and were then inconsistent with dlls that they themselves were calling in system32. I still have an "evaluation version" issue to sort out at some point but it doesn't affect the built executable so it can wait!
0 Kudos
Message 4 of 4
(2,841 Views)