From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

cwui error when not running on my dev box

I can build and run an MFC app with various NI controls on my development machine.

  OS: Win7/64

  MeasStudio 2010 SP1 9.1.0.204

 

I'm using the cwgraph control from the cwui.ocx.

  cwui.ocx  file properties: 7.1.0.306 7/24/2004

 

The VS project is set for Win32 / Debug

 

Now I want to run this app on a different PC under XP. I copied my executable and any dependent dlls to the XP box. I also copy cwui.ocx to C;\windows\system32 and register the ocx using regsvr32.

 

When I run my app on the XP box, a dialog box pops up with the title "cwui" and the message "Error loading control. A newer version needed. The default settings for the control will be used. This box pops up about 6 times - which is about the same number of NI controls I'm using on the form. the two graph controls say "Evaluation Copy"

 

Can someone tell me what could be causing this? Is there a special procedure for running a MS app on a non-dev PC?

 

Thanks,

 

Mitch

 

0 Kudos
Message 1 of 8
(6,541 Views)

Hello Mitch,

 

Here are a few links that explain which merge modules you need to make this work:

 

1. Where Can I Find A List of All The Necessary Measurement Studio Merge Modules?

2. Distributing Measurement Studio Applications in Microsoft Visual Studio 2003/2005/2008/2010

 

Regards,

 

Jeff L.

0 Kudos
Message 2 of 8
(6,536 Views)

The merge module list can also be found in the Measurement Studio Help File under the title "Measurement Studio .NET Merge Modules".

 

Jeff L.

0 Kudos
Message 3 of 8
(6,536 Views)

Jeff,

 

the two links are both for .Net apps. I am building an MFC app written in C++.

 

Are you saying that I will need to build an installer for my app? That it is impossible to just copy the executable (and its dlls) and register the ActiveC control.

 

Mitch

0 Kudos
Message 4 of 8
(6,532 Views)

Hello Mitch,

 

Correct. The second link explains the dependencies needed for your installer. The UI controls will require these merge modules. Please let me know if this fixes the error messages.

 

Regards,

 

Jeff L.

0 Kudos
Message 5 of 8
(6,528 Views)

Jeff, are you sure there is no way I can just individually register the ocx?

 

This is an internal tool and I'd like to keep it simple.

 

Our past experience with NI installers is not so good. We use the NI USB6008 IO board in our product and had to deploy a 200 MB installer just to get the drivers for that one board. And we didn't get just the drivers; it also installed and ran 14 services (that's not a typo, there really are fourteen services).Not to mention it caused numerous BSODs under Win7 (known problem).

 

Needless to say we don't use an NI board in our new instruments.

 

So you can see my hesitation in getting tablged up in another NI installer. Especially when the controls I'm using in cwui.ocx are considered by NI to be "legacy" and are no longer officially supported.

 

Can you think of anything simpler?

 

Mitch

 

0 Kudos
Message 6 of 8
(6,515 Views)

Hello Mitch,

 

Is there a version mismatch between what you have placed on the XP machine versus what is being used in your application on the development machine?

 

  • Right-click the cwui.ocx file in Windows Explorer
  • Select Properties
  • Select the Version tab
  • Check the File version (e.g. 8.1.11.377)

 

Regards,

 

Jeff L.

0 Kudos
Message 7 of 8
(6,505 Views)

Yes, that's what I finally figured out. After that, I was able to copy the ocx to the target machine and simply register it using regsrv32. Note that I also needed the mesa.dll. So no installer needed.

 

Curiously, the cwui.ocx file was not visible in windows/system32 using windows explorer. I had to use the command line to locate the one in windows/system32 which was the latest. In case anyone else is looking for it:

 

c:\> dir /s cwui.ocx

 

Thanks for your help,

 

Mitch

0 Kudos
Message 8 of 8
(6,497 Views)