LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI DLL run in VB, Panels don't work.

I have Written a dll in CVI, and run it in VB. I have a panel that is loaded using the CVI generated code (see below) but none of the controls on the panel will function (a control button will not even animate to show it being pressed), yet the actual panel callback still works (the close X at the top will close the panel).

CODE:-

int VigFDShowDebug (void)
{
panelDebug = LoadPanelEx (0, "VigFD.uir", PANELDEBUG, __CVIUserHInst);
if (panelDebug < 0) return -1;

debug = TRUE;
DisplayPanel(panelDebug);
RunUserInterface ();
return TRUE;
}

If you pause the program you can see it breaks on RunUserInterface().

Can anybode get my controls working???

Regards

Alex
0 Kudos
Message 1 of 6
(3,563 Views)
Hi Alex,

Did you make sure that you used the LoadPanelEx function? Please see the following link:

http://digital.ni.com/public.nsf/websearch/9A9A882B7A24BBBB86256CAA0075715D?OpenDocument

Regards,

Phil R
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 6
(3,563 Views)
Yes, the first line of the fuction is LoadPanelEx(). it is the same code that was generated from 'Code - Generate ALL'.
0 Kudos
Message 3 of 6
(3,563 Views)
Attached is the CVI project for the DLL, and the VB program to test it.

The Dll path is -
C:\My Documents\LabWindows\VigFDdll\vigFD.dll

The button to press in VB is "Show Debug" which calls the function 'int VigFDShowDebug (void);'

Hope this helps.
Download All
0 Kudos
Message 4 of 6
(3,563 Views)
Hi Alex,

The code seems to be missing "General.fp" (c:\drakard\FunctionPanels\General\General.fp) meaning that I cannot create the DLL. Can you supply this please?

Regards,
Phil
0 Kudos
Message 5 of 6
(3,563 Views)
Sorry,

I have managed to get the program working by keeping all the uir generated code in a seperate .c file (from the VigFD.C file). So Im think I have done something wrong in the VigFD.c code.

If you get chance, it would be nice to know how it went wrong.

Regards

Alex.
0 Kudos
Message 6 of 6
(3,563 Views)