LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use the dist.kit with ActiveX controlls

Hi,

I used the UI to code tool with ActiveX controls within it. Everything works fine on my machine. Unfortunately I am not able to produce a correct running dist.kit. The program runs well but the ActiveX controls are missing. Is this something to do
with
>>
extern int CVIFUNC_C NewActiveXCtrlFromPersistence (int panel, const char *ctrlLabel,
int top, int left, char *defaultIID,
int binaryFormat, char *persistenceText,
HRESULT *activeXError); // needed if there are ActiveX controls
??

in the generated c File by the UI to code generator?
If I want to load the controls with
>>
GetObjHandleFromActiveXCtrl (panelHandle, PANEL_UHR_1, &caKnobHandle_Uhr_1)

I do get an error.

Thanks for reading.
0 Kudos
Message 1 of 2
(2,728 Views)
For your distkit application to work in a different machine you need to somehow also distribute your activex controls. There are several ways to do this, depending on where this activex control comes from originally, and how it is packaged:

1. If this is a third party control which you installed in your development machine, you need to include the installer in your distribution media. You can then instruct your distkit to automatically launch this installer, by specifying it as the "Executable to Run After Setup."

2. If this is a simple control, developed "in house," or if for whatever reason you do not have an installer for it, then you need to track down its component files and make sure that the distkit installs these files as well. There should at least
be one .ocx or .dll file which you will definitely need to install. You should create a group in the distkit for the .ocx/.dll file(s) and select the "Register Files as ActiveX Servers" option for this group. Any other files that the control needs should be installed as part of a different group.

3. There is a yet a third possibility, which is probably much less likely, and that is if you have an installer for the control in the form of a Windows Installer merge module file (.msm). You cannot run this installer, as you would according to the first option, but you can still include it in your installation by creating a special group in the distkit named "_msms_" and then adding the .msm file to this group.

Hope this helps

Luis Gomes
NI
0 Kudos
Message 2 of 2
(2,728 Views)