05-02-2012 01:24 PM
I can build and run an MFC app with various NI controls on my development machine.
MeasStudio 2010 SP1 184.108.40.206
I'm using the cwgraph control from the cwui.ocx.
cwui.ocx file properties: 220.127.116.116 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?
05-03-2012 08:35 AM
Here are a few links that explain which merge modules you need to make this work:
05-03-2012 08:35 AM - edited 05-03-2012 08:38 AM
The merge module list can also be found in the Measurement Studio Help File under the title "Measurement Studio .NET Merge Modules".
05-03-2012 09:07 AM
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.
05-03-2012 09:22 AM
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.
05-09-2012 04:13 PM
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?
05-10-2012 07:25 PM
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?
file in Windows Explorer
05-11-2012 01:00 PM
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,