LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

LoadPanel fails with error code -94 File not found unless I'm in debug mode

Solved!
Go to solution

I've written a dll which has a number of panels contained in a .uir file.

When I debug this, using 'debug SeqEdit.exe', everything works fine.

But, if I simply use 'run SeqEdit.exe' (without debugging and using the same sequence file, I get the error message:

 'Error in call to LoadPanel.

 

Parent Panel Handle: 0,

UIR File Name: HiPot.uir,

Panel Resource ID: 4,

 

Error Code: -94

 

File not found'.

The uir file is still in the same place, the only difference is that I'm not using the debug option.

It's probably something simple that I've overlooked?

0 Kudos
Message 1 of 3
(4,498 Views)
Solution
Accepted by topic author Steve_59

shouldn't you use LoadPanelEx in this case?

0 Kudos
Message 2 of 3
(4,495 Views)

Thanks, I can try this, but my understanding is that LoadPanelEx is only required if the UI uses callbacks that weren't explicitly exported from the CVI code. Since the panels are created from the CVI UI wizard, I'd assume any callbacks (which there aren't because the panels are used modelessly and don't currently have any user input - the first panel that shows the problem has one text entry that says "Wait" and nothing else) would be correctly exported. And using LoadPanel works in debug but not normal run mode.

0 Kudos
Message 3 of 3
(4,485 Views)