Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Control Example fails

I have a program that uses a CNiGraph object that I want to be able to run on any Windows2000 computer. Alas, the executable works only on the development computer but not on any other computer.

I examined the Dynamic Control sample program and the licence utility sample program and was able to both reproduce the example and to integrate the ideas successfully into my program. All programs run fine on the development mashine that has all the National Instrument software installed.

However, If I try to run the executable contained in the Dynamic Control Example on a stand-alone PC that has no NI software installed, then the example program crashes : "Invalid Pointer" (the executable provided by National Instruments that is).

If
I run my own program or the Control Example after inserting the licence string (compiled on the development PC), then these programs run fine on the development PC but crash with an assertion error: "File: winocc.cpp, Line: 345"

From earlier debugging sessions while trying to get the licencing stuff to work in my program I got stuck in the same location if I attempted to .Create() if the corresponding m_hWnd member had already been invoked and was not zero - however, this is not the case now, because I check for this condition before I execute the Create() member function.

I thought the whole point of using the licence string stuff was to be able to deploy executables on any computer, not just the ones that have NI Measurement Studio for C++ installed?!
0 Kudos
Message 1 of 2
(2,939 Views)
The point of the license string stuff is only to be able to dynamically create the controls. This is typically done when you want to programmatically create your user interface rather than using an .rc file.

The C++ UI components are actually ActiveX controls with customized C++ wrappers for accessing the controls COM interfaces. The ActiveX controls implementations exist in cwui.ocx and cw3dgraph.ocx. To make your application work on a system that does not have Measurement Studio installed, you must redistribute these .ocx files and their dependencies.

For information about deploying Measurement Studio applications go to Visual C++ Help>>Tutorials>>Distributing and Installing Measurement Studio Applications in the Measurment Studio Reference.
Message 2 of 2
(2,939 Views)