User32.dll Causing Error on Application Exit

I have an application built into an exe with LabVIEW 8.2. It uses 1 simple call to user32.dll to determine if caps lock is on. When I build the application, it copies user32.dll to the 'data' subdirectory of my application. Everything works fine, however when I exit the program it throws a Windows error, "... has encountered a problem and needs to close..."
Now the fun part. If I remove user32.dll from this directory, everything works fine. I guess it just goes out and finds the original user32.dll in the system directory and there are no errors when I exit. Replacing the file in \data causes the error again.
The simplest thing would be to remove the call in my program as it isn't absolutely necessary (it just shows a warning when entering a password if caps lock is on), but there seems to be something weird going on because it only throws the error when using the dll it copied.
Is there any way to stop the application builder from copying dlls? I couldn't find anything.
Is there a way to force LabVIEW to release and cleanup any dlls it is using? If I could do this when the user exits, maybe whatever is causing this won't get left behind.

Marc A wrote:
I have an application built into an exe with LabVIEW 8.2. It uses 1 simple call to user32.dll to determine if caps lock is on. When I build the application, it copies user32.dll to the 'data' subdirectory of my application. Everything works fine, however when I exit the program it throws a Windows error, "... has encountered a problem and needs to close..."
Now the fun part. If I remove user32.dll from this directory, everything works fine. I guess it just goes out and finds the original user32.dll in the system directory and there are no errors when I exit. Replacing the file in \data causes the error again.
The simplest thing would be to remove the call in my program as it isn't absolutely necessary (it just shows a warning when entering a password if caps lock is on), but there seems to be something weird going on because it only throws the error when using the dll it copied.
Is there any way to stop the application builder from copying dlls? I couldn't find anything.
Is there a way to force LabVIEW to release and cleanup any dlls it is using? If I could do this when the user exits, maybe whatever is causing this won't get left behind.
You should not copy system DLLs to other systems. That is a recipy for troubles. Make sure to reference user32.dll form inside the Windows System directory in your Call Library Node. LabVIEW will then see this as system library and not include it in the build. Any Windows system will have user32.dll in the system directory so there is really absolutely no need to distribute that with your app, (and actually it is legally not even correct).
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • Windows API dll (user32.dll) cause fatal error

    Hi,
    On a setup, we using a touch screen. The LabView Software is running on full screen. I need to deactivage my front panel if the screensaver is on to prevent user start anyting. I use SystemParametersInfoA from user32.dll and this is working good, except, if I quit the software. "myexe a fin a error and need to close" (someting like that, my XP is in french).
    I don't have issues in debug mode, this error happen in exe mode.
    I use LV 8.6.1. Do you have any idea why?
    Thank you
    Solved!
    Go to Solution.
    Attachments:
    test.zip ‏10 KB

    CFiset wrote:
    Thank, I will take care of this details. But, unfortunly, this not working.
    uint32_t SystemParametersInfoA(uint32_t SPI, uint32_t 0, uint32_t *value, uint32_t False);
    SPI = 114 = SPI_GETSCREENSAVERRUNNING
    If *value != 0, screensaver ON, else scresaver OFF
    Still have the fatal Windows error.
    Thank
    I noticed the Call Library Node having a rather strange path to user32.dll on the initial load. Do you happen to have copied that DLL somewhere and referencing it with full path in your VI?
    That is a very big NO-NO! user32.dll and many other Windows system DLLs do weird things to the system and are utterly bad behavioured if you try to load another copy from somewhere else on disk than the system directory. Just change the library name to user32.dll only and let Windows pick the right DLL from its system directory.
    Another problem with specifying the full path to a copy of such a DLL is that LabVIEW will think you need to have this specific DLL in a built application and will include it in the build. However your user32.dll is almost 200% VERY incompatible to just about any other Windows system out there, because of Windows version, Service Pack, and bug fix upgrades as well as different language versions of Windows.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • DLL causes error when quiting LabVIEW 2009 on WIN7

    Hello,
    I have reduced the problem in my EXE application to the following attached code (see attachment). Somehow the DLL (To User32.dll) calls are creating a problem when quiting Labview 2009. The Application stays resident in the Windows taskbar and after a while an error appears about that there was a problem closing the application and that it can be reported to Microsoft if desired. Then a second error message appears before the application dissapears from the taskbar. If I remove the DLL:calls from the code then the problems dissapear.
    Should I unload the DLL calls on a special manner before quiting LabVIEW?
    Solved!
    Go to Solution.
    Attachments:
    DLL-WIN7 problem.jpg ‏35 KB

    Another potential problem not mentioned in that article is that you have included your user32.dll explicitedly in your built application. Doing that creates 200% for sure trouble as the kernel32.dll, user32.dll and others are always residently loaded into memory anyhow and mapped into the system memory section of any process. If you tell an application to load this DLL again by explicit name, you end up having two copies of it mapped in your process memory space and that will cause very weird problems.
    To avoid this problem make sure the library name inside the Call Library Node only specifies the DLL name without any path information. Then close the dialog and save it. If you reopen the dialog it will show the full path but still save the name only until you make a modification in the path control at which time you can end up having a full path again.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • CDHTMLDialog Causes Errors on App Exit

    I have an embedded CMFCListCtrl in report mode inside a CFormView derived class. The View also has an embedded toolbar. One of the buttons calls the CDHTMLDialog.
    Everything works fine up to that point. The Dialog opens.  Here is the problem:
    If I open the CDHTMLDialog and close the app: No errors.
    If I first populate the CMFCListCtrl. Call the CDHTMLDialog and close the app. I First get an access violation and a break point on AfxDeactivateActCtx with the following errors:
    First-chance exception at 0x78b64f64 (mfc90ud.dll) in PManager.exe: 0xC0000005: Access violation reading location 0x00000000075f3d70. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most
    recently activated one. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context
    being deactivated is not the most recently activated one. First-chance exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one. Unhandled exception at 0x771eb3dc in PManager.exe:
    0xC015000F: The activation context being deactivated is not the most recently activated one.
    I have tried literally everything and have not found a solution.
    Robert C Finnegan

    PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated one. Unhandled exception at 0x771eb3dc in PManager.exe: 0xC015000F: The activation context being deactivated is not the most recently activated
    one.
    It seems that you are accessing some NULL pointer and getting a heap corruption. I think you need to debug your code more careful to avoid memory issue in your application , we cannot check your code.
     Please try to break all the exception by throwing all exception name VS Menu->Debug-> Exception. Maybe this will give you further information about the First-chance exception exception.
    Hope this helps some.
    Shu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I am getting this error message" firefox.exe entry point not found, the procedure entry point is ThreadDesktopComposited could not be located in the dynamic link library user32.dll" before Firefox opens up

    this is the only error message that comes up, then Firefox opens up

    This issue can be caused by a problem with the file c:\windows\system32\dwmapi.dll
    The file dwmapi.dll is a Vista file and should not be present in Windows XP.
    http://support.microsoft.com/kb/969155 - On a Windows XP-based computer with Family Safety installed, you receive an error message: “The procedure entry point IsThreadDesktopComposited could not be located in the dynamic link library USER32.dll”

  • Lvrt.dll error in application

    Hi, I have built an application from my development PC and I am running it on a target PC. The application crashes regulary on the target PC, within 20 min. Windows displays an error measage that states that lvrt.dll caused the failure. I have been searhing the forum for answers, and found other people with the same problem, however there were no clear solutions to the problem. Does anyone have a solution?
    My labview version is 8.5.
    My hardware is a CompactDAQ chasis, with modules 9472, 9265, 9205. Moreover I am reading out temperatures from an Agilent 34970A though a GPIB interface.
    With kind regards,
    Jesper

    I too have been experiencing this problem, only with 8.2.  I have
    a built application that crashes semi-randomly on my development
    machine - XP blames LVRT.DLL.  I bundled the 8.2 LVRT.DLL into my
    build as suggested, that didn't help.  The application thus far is
    just a fairly complicated GUI with no hardware being addressed (yet)
    and no external libraries being called (yet).
    Insight, anyone?
    Thanx.

  • AI File Causing Fatal Application Exit

    I was initially getting error 147-1 after opening a large AI file in illustrator.  I restarted as prompted and continued to get it.  I restarted a few times and eventually the error subsided and the file opened.
    However, when I go to save the file, an "illustrator.exe - fatal application exit" occurs.  I am getting the following message:
    'The specified module could not be found.  C:\Program Files (x86)\Common Files\Adobe\Adobe Version Cue CS4\Client\4.0.0\VersionCueUI.DLL'
    I have come to the forums because Adobe's chat and phone lines proved to be more frustrating than helpful.  In fact, their advice after I refused to reinstall or start a new file was to 'go to the forums' because their troubleshooting guides do not support CS4...
    Someone, please help me!  I can take a huge step back and re-edit a previous version, but I'd be wasting hours of work.  Fortunately, it only seems to be a corrupted file of sorts versus an application issue.
    Thanks
    Zach

    Turn Off Verions Cue
    Edit >> Preferences >> File handling...

  • History report error: | An Exceptional Error occurred. Application exiting. Check the log file for error 5022

    Hi all
    I've got a error msg when try to generate a report using Cisco history report tool:
    Error | An Exceptional Error occurred. Application exiting.  Check the log file for error 5022
    It only happens when choose report template: ICD_Contact_Service_Queue_Activity_by_CSQ_en_us.
    User tried samething on other PC, it working fine.
    only on user' own PC and only choose this report, error appears.
    user runing windows 7 and do not have crystal report installed
    tried reinstalled the software, doesn't work.
    also tried this: (https://cisco-support.hosted.jivesoftware.com/thread/2041254) - doesn't work
    then tried https://supportforums.cisco.com/docs/DOC-6209  - doesn't work
    attached the log file.
    thanks.

    wenqianyu wrote:From the log file:Looks like you get a Login Window.Error message showed up after username/password be enteredThere is an error in the log: Error happened in comparing UCCX version and HRC versionYou may need to do a clean uninstall, download the Historical report from the server, and install it again on the PC.Does this only happen to one PC or to every PC with this application?Wenqian 
    I have completely uninstalled the HRC, and download from server install again -- still doesn't work with exactly same error.
    this matter only happens on this PC, when user try same thing on other PC, it works.
    so i think it not relate to server or account.

  • How do you use the windows User32.dll Library functions to read variables from other applications that are running

    I am trying to read a text box from a programme running at the same time as my Labview application using calls to the Windows
    User32.dll. I believe I need to find the window handle for the 'form' containing this text string and use this together with
    various other defined input variables to access the sting.
    I have no experience of using this 'Call Library Function Node', but have an understanding of the 'C' programming language. Does anyone have
    example Labview code showing how this might be done.
    Thanks

    If you're trying to access information that's being displayed in the window of another application and that application has no ActiveX interface, then yes, Windows calls can be used. There's a very good example on calling DLLs that ship with LabVIEW. Open the Example Finder (Help->Find Examples) and switch to the Search tab. Enter "Call" in the search box and open the VI "Call DLL". Run the VI, select any of the examples, and click the "Open Example VI..." button. That shows you how to call a DLL.
    Now, given that you have no experience in calling DLLs, have only an "understanding" of C (which to me means you have never written something like a DLL), and don't seem to know that much about what Windows functions you may need, you're going to find this route pretty difficult, especially since you have to deal with Windows API calls, which are not always that easy to do from LabVIEW.
    Let me propose an alternate solution. Go over to http://www.autoitscript.com/autoit3/ and download AutoIt. This is an automation tool that allows you to automate just about anything you want. It has an ActiveX interface that you can call from LabVIEW. I've attached an example VI that shows you how to use it to get the value of a text box from one of the tabs in the computer "System Properties" control panel applet.
    Attachments:
    AutoIt Example (v7).vi ‏25 KB

  • LV 8.5 DLL - Windows error on exit

    I created a DLL in a LabVIEW 8.5 project, and found that if I used the 'Call Library Function Node' in a subsequent LabVIEW 8.5 VI, the DLL functions worked perfectly, but after I exited LabVIEW I would get the attached error from Windows.
    I then created a very simple DLL VI, and built separate DLLs from it in LabVIEW versions 6.1, 8.2.1, and 8.5. I created a set of simple VIs to call these DLLs using LabVIEW versions 6.1, 8.2.1, and 8.5.
    The DLL calls worked perfectly in all combinations of VI & DLL versions (for example, calling the 8.5 DLL from a 6.1 VI, or calling the 8.2.1 DLL from an 8.5 VI, etc.). I repeatably get the error message after exiting LabVIEW ONLY after opening an 8.5 VI that called the 8.5 DLL. I have also tried calling DLLs written by others in LabVIEW version 7 from an 8.5 VI, which worked perfectly and there was no error after exit.
    Does anybody know why I might be getting this error message?
    Attachments:
    Error.png ‏68 KB

    BEHajder wrote:
    Hello Yi Y,
    Thank you (and Rolf) for your replies.
    I have not been able to configure the DLL build or Call parameters to avoid the error popup from occurring.
    I have attached a zip file which contains 4 sub-folders:
    The "LV 8.2.1 DLL" folder contains a project to build a simple DLL in LabVIEW version 8.2.1.
    The "LV 8.5 DLL" folder contains a project to build the same simple DLL in LabVIEW version 8.5.
    The "LV 8.2.1 DLL Test VIs" folder contains 2 LabVIEW version 8.2.1 VIs, one calls the version 8.2.1 DLL, the other calls the version 8.5 DLL.
    The "LV 8.5 DLL Test VIs" folder contains 2 LabVIEW version 8.5 VIs, one calls the version 8.2.1 DLL, the other calls the version 8.5 DLL.
    My test procedure consists of opening one of the Test VIs using it's version of LabVIEW, and then exiting LabVIEW.
    If I open the "Test 8.5 call 8.5 DLL.vi", I always get the error after exiting LabVIEW. Opening the other test VIs do not result in an error after exiting LabVIEW. It does not make any difference if the test VI was actually executed or not.
    The projects and VIs are very simple, please let me know if you think there is a configuration somewhere responsible for producing the error. I guess I am very interested to know if the error is reproducible for you, I have tested this on two Windows XP PCs here and both get the error. Also let me know if there is a problem with the attached zip file.
    I can't find any configuration error in these VIs, HOWEVER:
    I've run the 8.2 DLL with 8.2 Test in 8.2 and everything was fine.
    And I've run the 8.5 DLL with the 8.5 Test VI in 8.5 and everything is fine too!! No error dialog independant if I just open the VI and close LabVIEW or if I run the VI before closing.
    So I guess it is more of an environmental problem than a pure LabVIEW problem.
    As to my computer all I can say it is a Sony VAIO, Pentium Mobile 1.5GHz, Windows XP Professional SP2, with latest fixes, Englisch OS version, just about any NI software starting from LabVIEW 5.1 up to and including LabVIEW 8.5, LabVIEW 7.1 and 8.2 with DSC, IMAQ, FPGA and RT software, NI-DAQ 7.4, DAQmx 8.6, MAX 4.3, NI-488, NI-VISA 4.2 and a few other drivers like CAN etc.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Event 1000, Application Error (Faulting application name: w3wp.exe - Faulting module name: KERNELBASE.dll)

    Hello Guys,
    While running a web application am getting an error like: Remote server not responding. Below are the details of event viewers which been captured at the same time when this error happened:
    Event 1000, Application Error
    Faulting application name: w3wp.exe, version: 7.5.7600.16385, time stamp: 0x4a5bd0eb
    Faulting module name: KERNELBASE.dll, version: 6.1.7600.16850, time stamp: 0x4e211da1
    Exception code: 0xe053534f
    Fault offset: 0x000000000000a88d
    Faulting process id: 0x%9
    Faulting application start time: 0x%10
    Faulting application path: %11
    Faulting module path: %12
    Report Id: %13
    Event 1001, Windows Error Reporting
    Fault bucket , type 0
    Event Name: APPCRASH
    Response: Not available
    Cab Id: 0
    Problem signature:
    P1: w3wp.exe
    P2: 7.5.7600.16385
    P3: 4a5bd0eb
    P4: KERNELBASE.dll
    P5: 6.1.7600.16850
    P6: 4e211da1
    P7: e053534f
    P8: 000000000000a88d
    P9: 
    P10: 
    Attached files:
    C:\Windows\Temp\WERC9CD.tmp.WERInternalMetadata.xml
    C:\Windows\Temp\WERC9CE.tmp.hdmp
    C:\Windows\Temp\WEREE30.tmp.mdmp
    These files may be available here:
    C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_30877924d6b2c607fe88a8718915f25fb79093_cab_e905f2b0
    Analysis symbol: 
    Rechecking for solution: 0
    Report Id: d46a6849-8f6a-11e1-98af-00215e6e4855
    Report Status: 4
    This is an priority issue which we are facing in IIS. IIS is configured for Framework 2.0 and underlying OS is - Windows
    Server 2008 R2 Standard.This issue is replicable and occurring frequently Please suggest how to resolve it. Any input related to above issue is appreciable.

    Please refer similar discussions and see if they help
    Faulting application name: w3wp.exe 
    http://telligent.com/support/communityserver/community_server_2008/f/288/t/1067447.aspx 
    Event ID: 1000, Faulting application w3wp.exe, faulting module unknown, 
    http://social.msdn.microsoft.com/forums/en-US/clr/thread/9be88a2f-c8cc-4a73-9371-45ab73982123
    For IIS related queries, please post them in IIS forum - http://forums.iis.net/
    A UNIVERSE without WINDOWS is CHAOS !
    This posting is provided "AS IS" with no warranties or guarantees and confers no rights.
    About Me !!!

  • Error during client copy in GRC 10.0 -Application exit

    Hello Experts,
    After installing GRC 10.0,as post installation activity ,
    we are doing client copy (accordence with the sap note 1505255).
    but we are getting  'Application Exit Error' when executing method FDT_BEFORE_EXPORT_C:
    any help would be appreciated.
    regards,
    vinay singh

    HI
    Can you attach client copy log for analysis.
    Regards
    Rajan Arora

  • Why does opening some links in Firefox causes a "Server Error in '/' Application Runtime Error" but not in "Internet Explorer"?

    When I click on some links in an email (and Firefox is the default browser) I get the following error:
    Server Error in '/' Application.
    Runtime Error
    Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.
    If, however, I click the same links (and Internet Explorer is the default browser) I do not get any error and the proper content of the link is displayed.
    What is causing this error? As I prefer Firefox, how can this problem be fixed?
    OS Windows 7, Service Pack 1
    Firefox Version 32.0.1
    Internet Explorer Version 11.0.9600.17280
    Thank you for your assistance.
    Prime

    When you look at the address in the address bar, does it seem to match up with the email?
    Sounds like Firefox sent the server something it wasn't expecting. Sometimes this can be caused by obsolete or corrupted cookies -- assuming you have visited the site before. It also might be caused by modifications to standard information sent to servers such as the "user agent" string that specifies your browser version and OS.
    To clear a site's cookies, while viewing a page on the site, either:
    * right-click and choose View Page Info > Security > "View Cookies"
    * (menu bar) Tools > Page Info > Security > "View Cookies"
    Then try reloading the page. Does that help?

  • User32.dll error in Safari 4

    I installed Safari 4 about a week ago. (previous Firefox user)
    everytime i click onthe Safari icon, either on the desktop,
    or in the quicklaunch toolbar, i get this window:
    *"safari.exe entry point not found"*
    "The procedure entry point IsThreadDesktopComposited could not be located in the dynamic link library USER32.dll."
    I click okay to get out of that window, and then Safari opens as usual.
    Works okay. But I don't know what those error messages are about.
    I've uninstalled and re-installed Safari 4 twice, but problem persists.
    Anyone know why this is happening? And how to correct this?
    thanks!

    Try this link: http://support.mozilla.com/tiki-viewforum_thread.php?locale=en-US&commentsparentId=378981&forumId=1
    The same thing happens with Firefox. The culprit seems be a Vista system32 file called DWMAPI.DLL that should not be in XP system32.
    Do what the link says and it should solve the problem.

  • Application Exit Error during client copy

    Hi ,
    I have an ECC 6 system with DB2 database.I get an application Exit error while doing a client copy from 000 to 901.I could see all the tables where copied but the error comes in post processing stage.
    Application exit error
    function module :FIN_TR_CC_EXIT
    package :FINB_TRANSPORT_TOOL
    Program ended abnormally
    I tried to delete the client and recreate it again.But still it gave the same error.I tried deleting the client gain.But the deletion job cancels .
    Plz help me

    HI
    Can you attach client copy log for analysis.
    Regards
    Rajan Arora

Maybe you are looking for

  • Save strings in tdms format

    hi everybody!! can i save an array of string in tdms format??? how can i do it??any example??

  • How to stop grouped users from seeing all users?

    I have several users organized into groups, and would like to make is so that users can't see people outside of their group (or groups). No matter how I tweak permissions, all users get to see every other user no matter what group they're in. That is

  • 3 generation Ipod / itunes

    Every since I plugged my ipod into my mac, itunes hasn't been able to locate any of my music files.Can anyone tell me whats going on?

  • How to enable "Change characters to Chinese Traditional" and "Change characters into Chinese Simplified" ?

    I am a Taiwanese and usually use the feature of "Change characters into Chinese Traditional" or "Change characters into Chinese simplified" . Before I update Pages/Numbers/Keynotes , these features works well . I can transfer Chinese characters into

  • Performance leaks

    Hi all, I have performance leaks while using MaxDB. On operating system level, I see a process of user "sdb" which calls the command "fuser". This process is using about 50 - 100% of cpu time and needs long time to stop. After the process has stopped