LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Control callback not found in DLL

Solved!
Go to solution
Solution
Accepted by MJF

Just a guess;

 

For DLLs, for some cases, it is required to use the LoadPanelEx function.

You wrote "...I call LoadPanel to bring the panel into memory...

 

Can that be the problem?

S. Eren BALCI
IMESTEK
Message 11 of 14
(1,793 Views)

Eren is correct. The problem you're having is that you're calling LoadPanel, when you should be calling LoadPanelEx. There's a "blue text" warning directly on the LoadPanel function panel that mentions this.

 

Inside LoadPanel, the CVI Run-Time Engine must convert all those callback names in the .uir to function pointers. To do so, it must inspect the appropriate code module, where the .UIR's callbacks are defined. Because there is only one instance of the CVI Run-Time Engine in the entire process, but there can be multiple DLL modules, you must identify the appropriate module by passing its instance handle.

 

LoadPanel didn't have this parameter because the first version of the CVI UI Library didn't support loading from DLLs.

 

By the way, the callback functions do not have to be exported via the DLL interface, since there are no explicit calls, by name, to those functions from any other module.

 

Luis

 

 

Message Edited by LuisG on 04-08-2010 10:23 AM
0 Kudos
Message 12 of 14
(1,787 Views)

Thanks Eren and Luis, that solved my problem.

 

I knew I was missing something simple like that.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 13 of 14
(1,775 Views)

After the fact I saw the warning on the function panel when Luis mentioned it. I didn't even think about that yesterday because I use that function all the time and just type it in when I need it. There are a lot of UI functions that I do that with becuase I have been using CVI for a long time now (I go all the way back to 3.1) and I have many of them memorized.

 

I think I am going to get into the habit of using LoadPanelEx from now on, it will save me trouble in the long run.

Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 14 of 14
(1,763 Views)