From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

"...handle is invalid" : Error only when closing the Application, at RunTime everything seems fine...

Solved!
Go to solution

 

Hello ,

 

I am using CVI2010 and trying to use Control Array but I am stuck with "Resource Invalid error".

I can't create the control array handle. Did I miss somthing? I assined the buttons to CTRLARRAY.

 

Thank you,

 

Insuk

 

 

 

My header file has both Panel and Control array constants:

 

#define  PnlDigCNC                               2
#define  PnlDigCNC_STRING                 2       /* control type: string, callback function: (none) */
#define  PnlDigCNC_TOGGLEBUTTON_8         3       /* control type: textButton, callback function: (none) */
#define  PnlDigCNC_TOGGLEBUTTON_7         4       /* control type: textButton, callback function: (none) */
#define  PnlDigCNC_TOGGLEBUTTON_6         5       /* control type: textButton, callback function: (none) */

 

#define CTRLARRAY 1

 

 

Source file :

 

if (pnlDigCnCHandle == 0){
    if ((pnlDigCnCHandle = LoadPanel (0, "Cnc.uir", PnlDigCNC))<0)
     return -1;
   }
   
   DisplayPanel(pnlDigCnCHandle);  
   

   if (pnlDigCnCHandle > 0 ){
    DigSWarray = GetCtrlArrayFromResourceID (pnlDigCnCHandle,CTRLARRAY ); 
   }
   
Error :

Library function error(return value == -24) Resource ID not found in user interface resource file.

 

 

 

 

 

0 Kudos
Message 11 of 13
(1,075 Views)

Hello momo2013 / Insuk,

 

why don't you start your own new thread instead of hijacking this one - I don't see any relation between these two topics... Aslo have a look here

 

Concerning your question, your constant probably is wrong, I would assume that it should be something like PANEL_CTRLARRAY

0 Kudos
Message 12 of 13
(1,071 Views)

Continues here

0 Kudos
Message 13 of 13
(1,053 Views)