LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Library function error (return value == -60 [0xffffffc4]). The control passed must be a list control

Hi,

   I have this error response when I run the function "InsertListItem" in my CVI application.

 

The problem is that this function run until two weeks ago, when I have done a total backup of the project. From yesterday I found this error and I can't go on. Any field of the function is the same of the previous time, so I don't know what to do now...

Anyone knows which are the possibile reasons?

 

Thank you

 

B.M.

0 Kudos
Message 1 of 7
(4,565 Views)

There is no definitive answer to your question: without looking at the code is difficult to understand what may have happened.

 

May it be that the list control is on a tab control and the order of tab pages has been changed? If so, an hypothetical GetPanelHandleFromTabPage could return an incorrect handle if you have not updated the page index accordingly. Hence the error you are getting. I would expect, if this is the case, some other simila error in this case, though, unless the list control is the only one present on that page.

 

But this is only a blind shot (and I haven't serviced my crystal ball recently Smiley Wink ).



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(4,557 Views)

Ok sorry, you're right...

 

My code is the following, I didn't report it because I didn't think it may be useful...

 

...

   if ( (strcmp(name, "flow")) && (strcmp(name, "address")) )
    {
    InsertListItem (tiger, PANEL_INLISTBOX, j, name, 0);
    j++;
    }

...

 

The parameters are:

 - tiger --> static int generated by the followinf command: "tiger = LoadPanel (0, "GraphIF.uir", PANEL);

 - PANEL_INLISTBOX --> get by "GraphIF.uir" and it is defined;

 - j --> int initialized to '0';

 - name is a simple char[];

 - the last field is always 0.

 

When I run the code in debug way, all the parameters of the function are correct, but with the execution of "InsertListItem" CVI gives back a "Fatal RunTime error". The problem is that this code does not run anymore. I'm afraid that something was corrupted on my PC, but I don't know what.

My function declaration seems to be correct, only the execution does not run (the builder gives me no error).

 

Do you understand something more now or my explanation was confusing? Smiley Wink
Thx

0 Kudos
Message 3 of 7
(4,548 Views)

I don't know exactly what to think: the code apparently is good, moreover it has worked for a time so I suppose the problem may lie outside the code...

How did you backed up the whole project? Could you have restored some old UIR file version with different panel/control names?

 

You could try to click on the file name in LoadPanel line and press Ctrl+U, seeing if the correct UIR file is opened; next you can click on PANEL_INLISTBOX and press Ctrl+Shift+U checking that the correct control is found.

 

Additional questions: are you always running in the IDE (debug mode) or the error comes up in the executable?

Have you checked 'tiger' and 'PANEL_INLISTBOX' values at runtime? Are they correct?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 7
(4,542 Views)

Ok, you give me the right idea. The problem was in the ".h" file, where I overwrote a button command constant!!! Once understood, in 5 second no problem is more present Smiley Happy

 

Thanks, now my project runs again

 

BM

0 Kudos
Message 5 of 7
(4,530 Views)

Problem solved


black_mamba ha scritto:

Ok, you give me the right idea. The problem was in the ".h" file, where I overwrote a button command constant!!! Once understood, in 5 second no problem is more present Smiley Happy

 

Thanks, now my project runs again

 

BM


 

0 Kudos
Message 6 of 7
(4,527 Views)

Ho avuto proprio ieri lo stesso problema. La vecchia copia di backup dell'UIR funzionava la nuova no.

Dopo vari tentativi ho pensato all'ultima modifica: avevo "INCOLLATO" un nuovo controllo (TIMER in particolare) tolto da un altro pannello.

Rimosso quel controllo .... tutto funziona. Rimesso.... tutto bloccato.

Soluzione: l'ho tolto e lo ho "CREATO" localmente identico. FUNZIONA.

Auguri,

 Gianantonio

0 Kudos
Message 7 of 7
(4,354 Views)