LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error after stopping executable

Hi Philip

Ok, I replaced my dll-call with your vi, built an exe, run it and the error still appears.

Don't forget the point that it works correctly and without error, if I start it in development mode. The error just comes up after stopping / exiting an executable.

Did you try my vi as exe too?

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 11 of 16
(1,193 Views)

@Philip C. wrote:
Your VI seems to be fine except for the "uType" which is supposed to be I32 and not U32.


Really?
According to the MSDN this is a UINT.
Is there something I'm missing?

___________________
Try to take over the world!
0 Kudos
Message 12 of 16
(1,191 Views)
I agree with tst - that's why I set a U32.

But maybe that's one more MS-puzzle, which mankind will never be able to solve... 😉
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 13 of 16
(1,186 Views)
Hi Thomas and 'tst',

Ooops, you are right that the 'uType' should be U32 and not I32. The confusion comes from the MessageBox.vi that uses I32 to avoid a coercion dot, since the "MessageBox Type" Listbox can only be a I32. Sorry!

Apart from this, I figured out what the issue was. Originally I was able to reproduce the error with your executable. I noticed that the "user32.dll" was being copied to the "data" folder when building your VI into an executable. Since your VI was supposed to point at the DLL in the "C:\WINDOWS\SYSTEM32\" folder, I deleted the DLL in the "data" folder. From that point onwards, I didn't receive the error anymore.

I tried building the "MessageBox.vi" into an executable and noticed that a "data" folder wasn't created, hence no copy of the user32.dll. After some investigation, it turns out that the reason that the DLL is not copied, is because the DLL is not being specified by path in the Call Library Function Node - only the name "user32.dll" appears where it in your VI specified "C:\WINDOWS\SYSTEM32\user32.dll". Specifying the complete path will result in the DLL being added to the "data" directory when the VI gets build to an executable. Refer to this other thread about the same issue.

Therefore, to make a long store short, you have two options to fix your VI/executable:
  1. Workaround: After creating the executable, delete the user32.dll from the "data" directory. Your executable will now spend some time searching for the DLL every time you launch the executable. Fix this by adding the "C:\WINDOWS\SYSTEM32\" folder to "Tools >> Options... >> Paths >> VI Search Path" of the executable. This will result in an added line in the *.ini file.

  2. Fix: Use only the name of the DLL in the Call Library Function Node by deleting the path (see info in the above link). This will result in no copy of the DLL being created when building the application.

Thomas, I hope this solves your issue on your system too. Please let me know if you have any questions, thanks.
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
Message 14 of 16
(1,172 Views)
Hi Philip

It was a long hard fight but in the end I could manage to remove the path.

Now it works.

Thanks a lot for your help.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 15 of 16
(1,165 Views)
Hi @ all,
 
I have the same problem!
But the error doe's not appear after stopping the executable!
It is shown however if I insert a combi box on the front panel and want to change the characteristics.
 
I don't know what to do and I can't work without using a combi box!
 
Thanks,
Atha
0 Kudos
Message 16 of 16
(1,032 Views)