04-08-2010 07:58 AM
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?
04-08-2010 10:22 AM - edited 04-08-2010 10:23 AM
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
04-08-2010 11:53 AM
Thanks Eren and Luis, that solved my problem.
I knew I was missing something simple like that.
04-08-2010 12:35 PM
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.