LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

callback function in UIR file is not a known function

Whenever I call
 
LoadPanel (0, "CAL_ATP.uir", TEXT_PNL);
 
or
 
LoadPanelEx (0, "CAL_ATP.uir", TEXT_PNL, __CVIUserHInst);
 
in my CVI-generated DLL, I get this:
 
"The callback function, ClosePopup, specified in the UIR file, is not a known function. If you are using an external compiler, you must include the UIR callbacks object or source file in the executable or DLL."
 
I clearly have ClosePopup defined in my DLL. Even when I select "Embed Project .UIRs" under the "Build >> Target Settings..." menu, it still can't find ClosePopup. Other functions in my DLL are exported by export.h and used successfully by TestStand, but ClosePopup is not found by LoadPanel or LoadPanelEx.
 
How can I fix this?
Message 1 of 6
(6,642 Views)

When this happened to me once it was because I had a typo in the name of the function. (eg. ClosePopUp instead of ClosePopup) Ever since then I always let CVI generate the function prototypes for all callbacks in the UIR. Perhaps you could try editing the name slightly and let CVI go through the normal activities (of generating the CAL_ATP.h file; and the function prototype in your source code) to see if this clears the problem.

JR

0 Kudos
Message 2 of 6
(6,631 Views)

When this happened to me I had a problem where the function was actually present but the function was not in the UirCallbackTable.c.  This table was supposed to be automatically generated but it wasn't updated due to Clearcase File Configuration issues.  So check to see if your function is in UirCallbacTable.c.

Donna

0 Kudos
Message 3 of 6
(6,625 Views)
I had it declared
 
void __stdcall ClosePopup (...);
in an attempt to make it export, when I should have stuck with
 
int CVICALLBACK ClosePopup (...);
like CVI generated for me. Now it works, thanks.
0 Kudos
Message 4 of 6
(6,615 Views)

Hey Bruce,

Where are you these days?  I worked with you @ Symtx on JSF some time back.  Last I heard was that you were in CA.

Todd

0 Kudos
Message 5 of 6
(6,611 Views)
Hiya Todd, I wasn't expecting to see you here! I'm back in CA for a few months.
 
Send me an email at bruce89.temp89@lc89technology.com, only remove those 89's first. I'm avoiding bots that way.
0 Kudos
Message 6 of 6
(6,600 Views)