Exception of LabVIEW on 'stop' - unloading/cleaning of the wrapper DLL

OK, I want to check my thought on this is correct:

We have created a wrapper DLL in VC ++ which exposes certain functions from a DLL/third party API. It works very well - there is an initialization, get data and close VI using the COLD LAKE. However there is a small problem with the envelope - if the VI 'close' is not called (which calls the function close API) for example, if we give up demand during the development/debug then LabVIEW crashes with an exception.

I suspect that this is because the function "close" to the API is called never so he never cleans when execution stops. Is this fair?

Is the solution to change the wrapper DLL DllMain() for have the following and handle the DLL_PROCESS_DETACH by calling close function API? Is there something more I need to know?

BOOL WINAPI DllMain(
         HINSTANCEhinstDLL,  // handle to DLL module
         DWORD fdwReason,     // reason for calling function
         LPVOID lpReserved )  // reserved
{
    // Perform actions based on the reason for calling.
    switch( fdwReason )
    {
    case DLL_PROCESS_ATTACH:
        // Initialize once for each new process.
        // Return FALSE to fail DLL load.
        break;

    case DLL_THREAD_ATTACH:
        // Do thread-specific initialization.
        break;        

    case DLL_THREAD_DETACH:
        // Do thread-specific cleanup.
        break;

    case DLL_PROCESS_DETACH:
        // Perform any necessary cleanup.
        break;
    }
        return TRUE;
}

The original DllMain function looked like this:

BOOL APIENTRY DllMain( HANDLE hModule,
                        DWORD  ul_reason_for_call,
                        LPVOID lpReserved )
{
    return TRUE;
}

(Break: http://www.ni.com/white-paper/3056/en/)

Stupidly, because I had problems with Visual Studio I couldn't try it at display time, but change the worked DllMain function and we get is more the exception of LabVIEW to exit.

Tags: NI Software

Similar Questions

  • When I try to enter in bigfish games as it attempts to load it on my computer stop and I get the following: werfault.exe, unknown software exception 0 x 00000409 held @ location 0 x 76117715. How can I fix this kind bigfish will load?

    When he tries to access bigfish games installation stops and I get the above error code

    Hello

    Please use the Forums of Microsoft Windows 7.

    Follow the instructions below that may help you resolve the issue.

    Method 1:

    Let us try to disable the Antivirus security software and check if the problem is resolved.

    Re-enable the security software after checking the issue.

    Alternatively, you can try to disable the firewall and see if the problem is resolved.

    Re-enable the firewall after checking the issue.

    Method 2:

    To perform the clean boot procedure, follow the instructions in the link below.

    Step 1: Perform a clean boot

    Step 2: Enable half the services

    Step 3: Determine whether the problem returns

    Step 4: Enable half of the startup items
    Step 5: Determine whether the problem returns

    Step 6: Resolve the problem

    Step 7: Reset the computer to start as usual

    How to troubleshoot a problem by performing a clean boot in Windows Vista

    http://support.Microsoft.com/kb/929135

    After checking the problem, turn the computer back to the Normal mode.

    Uninstall or update the program that is causing the problem.

    Please post back and let us know if it helped to solve your problem.

    Kind regards

    KarthiK TP

  • LabVIEW: Null window... stopped to stranger on the block diagram

    Hello

    I have a pretty important program that has been written in Labview 6.0. Recently, we have upgraded to Labview 9.0 and this program has been exported to an executable file with the new version.

    When you run the executable file, I sometimes have the following error as seemingly random places. I was not able to crash when not to use the executable file. LabVIEW: Window zero. The first level VI ".vi" stopped to stranger on the block diagram of ".vi".

    I apologize for having empty on the names of vi, but I can't give names of vi, say what is the software or code. I can tell it uses NI USB-6212 IO cards, interfaces with the instruments of Rhode and Swartz and uses a lot of file i/o.

    I was hoping someone could give me a hint on how to debug such a mistake. I noticed that when this error occurs, the memory usage almost doubles.

    Thank you

    James


  • Cannot clean up the queue and print the new document

    All of a sudden in trouble with my C6180 all-in-One. It didn't print a document remaining queues. Tried everything to clean up the queue. But nope. Document is in the list. Document status information: deletion. And never remove the ends. Right now my printer is not a printer. Can anyone help?

    Hello

    In Control Panel, open administrative tools and select abuse.  Scroll down to the print spooler service, right click and select Properties, then click the Stop button.  Now search for C:\Windows\System32\Spool\PRINTERS, then delete the tasks within this folder - you may need to click a command prompt to get the authority to open the PRINTERS folder.

    Restart the computer and you should find that the documents have been deleted.

    Kind regards

    DP - K

  • 2010 15 "MacBook Pro unexpected stops and defects of the screen

    As stated in the subject, I have a 2010 15 "MacBook Pro that runs on OSX Mavericks.

    I have experienced unexpected stops and, more recently, the screen glitches (see photos).

    I also have this message since Photoshop at a secure startup: "Photoshop gave up waiting for the assessment of the display driver.  Improvements using graphics hardware have been disabled.  Check the Web site of the manufacturer for the latest version of the software.

    Please review my images for more information.  I made a Starter course and managed to back up my computer (took 6 hours).  Now, I just need to fix it.

    PROPOSED ISSUE: I think I'll have problems of GPU and is forced to remove my components materials dust or replace certain parts.

    Please let me know if you have any ideas or solutions that could make me run!  Thank you!

    I suggest to install "El Capitan", a clean install, in this case, could be better

  • "VI a error 1002288.The full version of LabVIEW Development is necessary to correct the errors."

    Hello

    I had created an executable in LabVIEW 8.6 on a PC windows XP 32-bit. The application uses some screws of Vision. The executable is running in most of the PC except one. the PC is a windows 7 64 bit. I first got the error "Labview support 3 error code: could not load front". "" I fixed this by changing the settings of the source file in the application builder. Now I get the error message "VI a error 1002288.The full version of LabVIEW Development is necessary to correct the errors"and the exe displays a run button broken.»

    But if I build the exe in the same PC I get no error and it works very well. Moreover, I tested this exe in another PC with the same configuration, it works. I tried to reinstall labview in the PC, the problem persists.

    Hi Nitrox,

    There is no official adapter for LabVIEW 8.6 in Windows 7. See link below.

    www.ni.com/LabVIEW/OS-support/

    Upgrade to SP1 LV2009 should solve your problem. We had this problem with another client and update SP1 LV2009 solved his problem and should solve your problem too. If you have a problem after the update let me know.

    Kind regards

    Christophe P

    Technical sales engineer

    National Instruments

  • Cleaning of the printheads to 6980 in windows 7?

    It's maddening!  I can't believe that there is no work around for the Toolbox missing in windows 7.  I NEED to clean the print heads and can't understand how.  I tried to do it manually according to instructions from HP (keep the button / stop, pressing CV 6 times and letting) but nothing happened.  Can anyone help?  I don't want to have to sell this printer and get a new one in order to be able to clean the print heads; This is ridiculous.   Thank you!

    Hi bookprint.

    I'm sorry to hear you're having problems with cleaning of the print head. I found a few troubleshooting steps that are useful to show you how clean the area around the cartridge nozzles.

    Maybe we can solve your problem of box to missing tools as well. If you upgraded to Vista, download HP Print Software Patch when upgrading Vista to Windows 7.

    This patch will fix the problems with the features and the following features:

    • HP print status
    • Toolbox
    • Ink levels
    • Solution Center
    • HP Scan (all-in-One)
    • Button scan of cover (all-in-One)

    I hope it's useful.

  • A program respond with code exception 0xc0000005 after I did an update of the window.

    Original title : A single program stop responding after that I did an update of the window.  How can I solve this?

    After that I did a windows update, a program does not work.  I try to bring it to the top and it says pmast MFC Application has encountered a program and must be closed.  When I look at the report of what is sent, it gives a code of 0xc0000005 exception.

    Hello Kevinsbabydoll,

    Thanks for the return of the response.  Are you able to perform a system restore, sometime before the Windows updates?  If you can do this, I'd install each update at the same time to confirm your program still works correctly.

    Windows XP system restore

    http://TechNet.Microsoft.com/en-us/library/bb490854.aspx

    Thank you

    James

  • You must stop your request before the engine may stop

    I have an integrated application that uses LV DSC 6.0.2. The application starts and stops the engine tag programmatically. The application works fine, but on some machines, I'll get continuously the next dialog box when I try to stop the engine of the tag:

    "You must stop your request before the engine may stop"

    It's strange, because it only happens on some machines (it seems that it can occur on computers with ONLY of DSC Run-Time installed, not the full dev system. DSC LV).

    The dialog seems to refer to the application of 'control' which tries to stop the engine... it isn't telling me that my devices servers need to be stopped.

    This dialog box does not seem logical, I should be able
    to build an application that can start and stop the engine... and why I get this dialog on some machines but not on others?

    John Paul,

    There are two points that we should ask ourselves:
    1: you can have different loops while in your application where you read/write to and from the engine of the tag with the read/write Tag.vi. These screws has a stop of production which must be wired first the while loop. If you have cases where you do not connect this output to your time stop loop you could access the engine while you want to stop the engine in another loop with the Shutdown.vi engine. -> Make sure you have all drivers of DSC to access loops has stopped before you turn off the engine.

    2nd: I guess he was once an issue of race with the DSC engine condition and how it access to shared memory with the read/write Tag.vi. But this condtion of race must be agreed with the version of LabVIEW DSC
    6.1 or with other fixes for LabVIEW DSC 6.0.2. You can download patches (in this case, particularly the BVRTDatabase.dll) driver update page & of NOR: www.ni.com/support/ > Option 3, drivers and updates > Search drivers and updates > type 'LabVIEW DSC' > choose LabVIEW Datalogging and Supervisory Control 6.0.2 fixes.
    You must apply the patches of this as well on your DSC 6.0.2 Run Time System!

    I hope that one of the help of two suggestions to solve your problem.

    Concerning
    Roland

    FTP://FTP.NI.com/support/LabVIEW/labviewdsc/fixes/6.0.2/

  • Windows Mail stops when I use the spellchecker

    Windows Mail sometimes/often stops when I use the spellchecker.  There is no obvious reason or a consistent trigger I can find.  I lost the email I typed.  I would prefer not to have to record every email in my drafts before I check spelling it.  How can I fix?

    Hi Holnee,

    Looks like you can have something in the background, interfere or that we would need to check the system for any problem files.

    The first thing you can do is to check your system for any possible infection such as a virus or spyware. Do a full scan of the system and see if you find infections and if yes which solves the problem that you are experiencing.

    The next thing to do would be to put yourself in a situation of clean boot to ensure that no background program interfere.

    1. Open the Start Menu
    2. Type msconfig in the Search box and press enter
    3. Click on continue in the UAC prompt
    4. On the general tab, click Selective startup.
    5. Under Selective startup, click on to clear the Load Startup items check box.
    6. Click on the Services tab, click to Select the hide all Microsoft Services check box and then click on disable all.
    7. Click OK.
    8. When you are prompted, click restart.
    9. After the computer starts, check if the problem is resolved.

    If that still does not solve the problem then let's you run the System File Checker.  It will scan all protected system files and replaces incorrect versions with appropriate Microsoft versions.

    1. Open the Start Menu
    2. Type the command prompt in the box start the search
    3. Right click on command prompt and select run as administrator
    4. Click on continue in the UAC prompt
    5. Type the following command and press enter:
      sfc/scannow

    Please let us know if this solves your problem, or if you have any questions.

    Matt
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Development in error "Installer.exe has stopped working" while installing the new modem.

    Development in error "Installer.exe has stopped working" while installing the new modem. I try to install the ZTE AC8710 modem on my 32-bit windows vista (home edition) system, but whenever the facility is subject to the full I get the error 'Installer.exe has stopped working' and complete Setup doen't. The same error is hit when I try to uninstall the ZTE modem that is installed intestinal. The installation file has CD/install drivers for windows vista. Information below is displayed in the application event viewer for this error log. Help, please

    Log name: Application

    Source: Application error

    Date: 2010-01-03 02:04:50

    Event ID: 1000

    Task category: (100)

    Level: error

    Keywords: Classic

    User: n/a

    Computer: Monica-PC

    Description:

    Application Installer.exe, version 0.0.0.0, time stamp 0x4b208462, Installer.exe module, version 0.0.0.0, time stamp 0x4b208462, exception code 0 x 40000015, offset error 0x0002efec, 0xadc process id, failed failed application start 0x01cab8b5797299e1.

    The event XML:

    1000

    2

    100

    0 x 80000000000000

    309

    Application

    Monica-PC

    Installer.exe

    0.0.0.0

    4b 208462

    Installer.exe

    0.0.0.0

    4b 208462

    40000015

    0002efec

    ADC

    01cab8b5797299e1

    Hi Tonio saini,.

    Navigate to the location of the programs .exe file and right click on the .exe file, and then select run as administrator to install the modem.

    You can also check the following link, try the suggestions and check if that helps:

    http://social.answers.Microsoft.com/forums/en/w7hardware/thread/4ce21286-3a77-4A06-923c-889d657f8e33

    Hope this information is useful.

    Jeremy K
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • My computer laptop stop periodically and gives the following codes BCCode d1, 00000010 BCP1, BCP2 00000002 BCP3 00000001, 8A25F1C8 BCP4.

    My stop laptop periodically and gives the following codes:
     
    BCCode d1
    BCP1 00000010
    BCP2 00000002
    BCP3 00000001
    8A25F1C8 BCP4

    I was not able to find a solution to restart windows by clicking find a solution online. The system is free of viruses and other items malcious. Any ideas would be helpful because my laptop did not come with a repair disc and I'm afraid to make one with these questions.

    Thank you

    Hello

    Think video drivers especially if it may be others. Refer to the section of driver in my generic bluescreen
    methods of troubleshooting below. BIOS, low and antispyway/antivirus/security chipset drivers
    programs may also cause this. Check the resolution of problems and when you get to the section driver view
    for generic methods in the next message and then back to the if necessary troubleshooting tool.

    BCCode: D1 0x000000D1

    Cause

    A driver tried to access a pageable (or that is completely invalid) address while the IRQL was too high.

    This bug check is usually caused by drivers who used a wrong address.

    If the first parameter has the same value as the fourth parameter, and the third parameter indicates a runtime operation, this bug check was probably caused by a driver who was trying to run code when the code itself has been paginated outside. The possible causes for the error page are:

    • The function was marked as pageable and was operating at an IRQL higher (including obtaining a lock).
    • The function call was made to a function in another pilot, and that this driver has been unloaded.
    • The function was called by using a function pointer that was an invalid pointer.

    ======================================================

    Look in the Event Viewer to see if something is reported on those.
    http://www.computerperformance.co.UK/Vista/vista_event_viewer.htm

    MyEventViewer - free - a simple alternative in the standard event viewer
    Windows. TIP - Options - Advanced filter allows you to see a time rather
    of the entire file.
    http://www.NirSoft.NET/utils/my_event_viewer.html

    -------------------------------------------------------------------------
    Also this, so you can see the probable bluescreens.

    Windows Vista restarts automatically if your computer encounters an error that requires him to plant.
    http://www.winvistatips.com/disable-automatic-restart-T84.html

    -------------------------------------------------------------------------

    Here are a few ways to possibly fix the blue screen issue. If you could give the blue screen
    info that would help. Such as ITC and 4 others entered at the bottom left. And all others
    error information such as codes of STOP and info like IRQL_NOT_LESS_OR_EQUAL or PAGE_FAULT_IN_NONPAGED_AREA and similar messages.

    As examples:

    BCCode: 116
    BCP1: 87BC9510
    BCP2: 8C013D80
    BCP3: 00000000
    BCP4: 00000002

    or in this format:

    Stop: 0 x 00000000 (oxoooooooo oxoooooooo oxoooooooo oxooooooooo)
    Tcpip.sys - address blocking 0 x 0 00000000 000000000 DateStamp 0 x 000000000

    It is an excellent tool for displaying the blue screen error information

    BlueScreenView scans all your minidump files created during 'blue screen of death '.
    hangs and displays information about all accidents of a table - free
    http://www.NirSoft.NET/utils/blue_screen_view.html

    BlueScreens many are caused by old or damaged, drivers particularly video drivers but it
    are other causes.

    You can do without if needed fail or the Vista DVD or recovery command prompt mode
    Options if your system was installed by the manufacturer.

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    You can try a system restore to a point before the problem started when one exists.

    How to make a Vista system restore
    http://www.Vistax64.com/tutorials/76905-System-Restore-how.html

    -------------------------------------------------------------------------

    Start - type this in the search box-> find COMMAND at the top and RIGHT CLICK – RUN AS ADMIN

    Enter this at the command prompt - sfc/scannow

    How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe)
    program generates in Windows Vista cbs.log
    http://support.Microsoft.com/kb/928228

    The log can give you the answer if there is a corrupted driver. (Says not all possible
    driver problems).

    Also run CheckDisk, so we cannot exclude as much as possible of the corruption.

    How to run the check disk at startup in Vista
    http://www.Vistax64.com/tutorials/67612-check-disk-Chkdsk.html

    -------------------------------------------------------------------------

    Often drivers up-to-date will help, usually video, sound, network card (NIC), WiFi, part 3
    keyboard and mouse, as well as of other major device drivers.

    Look at the sites of the manufacturer for drivers - and the manufacturer of the device manually.
    http://pcsupport.about.com/od/driverssupport/HT/driverdlmfgr.htm

    How to install a device driver in Vista Device Manager
    http://www.Vistax64.com/tutorials/193584-Device-Manager-install-driver.html

    How to disable automatic driver Installation in Windows Vista - drivers
    http://www.AddictiveTips.com/Windows-Tips/how-to-disable-automatic-driver-installation-in-Windows-Vista/
    http://TechNet.Microsoft.com/en-us/library/cc730606 (WS.10) .aspx

    -------------------------------------------------------------------------

    How to fix BlueScreen (STOP) errors that cause Windows Vista to shut down or restart
    quit unexpectedly
    http://support.Microsoft.com/kb/958233

    Troubleshooting, STOP error blue screen Vista
    http://www.chicagotech.NET/Vista/vistabluescreen.htm

    Understanding and decoding BSOD (blue screen of death) Messages
    http://www.Taranfx.com/blog/?p=692

    Windows - troubleshooting blue screen errors
    http://KB.wisc.edu/page.php?id=7033

    -------------------------------------------------------------------------

    In some cases, it may be necessary.

    The Options or Vista recovery disk Startup Repair

    How to do a startup repair
    http://www.Vistax64.com/tutorials/91467-startup-repair.html

    This tells you how to access the System Recovery Options and/or a Vista DVD
    http://windowshelp.Microsoft.com/Windows/en-us/help/326b756b-1601-435e-99D0-1585439470351033.mspx

    I hope this helps.

    Rob - bicycle - Mark Twain said it is good.

  • Why Photoshop stop when I touch the touchscreen on the lap top and I can avoid it?

    Every time I start Photoshop you stop with this message below saying that it has stopped working. I realized that it stops when I touch the screen. How can I avoid this and it is possible to work in Photoshop using the touchscreen?

    It is not normal that photoshop to complete when you touch the screen. Either something with photoshop is corrupt or the driver for the touch screen.

    First thing to try is reset the photoshop preferences. CTRL-k on windows or cmd - k on a mac, and at the bottom of the Panel is a button to reset the preferences.

    If this does not work, uninstall photoshop, restart your computer, reinstall photoshop.

    Next is to see if you can update the driver of the touch screen. Sorry I don't know how to do and would depend on if your windows or mac and what version of the operating system that you use.

    Finally run CC Cleaner

    This will remove all traces of Adobe programs on your computer. Restart the computer, and then reinstall the Manager then photoshop.

    I hope that one of the above will solve your problem, if not let us know.

  • Photoshop CC 2015 (Norwegian version) will not start. The following message: Adobe Photoshop CC has stopped working.  A problem caused the program stopped fungeresom correctly. The program will be closed and you will be notified if a solution is av

    Photoshop CC 2015 (Norwegian version) will not start. The following message: Adobe Photoshop CC has stopped working.  A problem caused the program stopped fungeresom correctly. The program will be closed and you will be notified if a solution is available.

    reset your preferences-

    Acrobat: http://help.adobe.com/en_US/acrobat/X/pro/using/WS58a04a822e3e50102bd615109794195ff-7feb.w .html

    Adobe media encoder: https://forums.adobe.com/thread/1713540

    Legacy: http://helpx.adobe.com/after-effects/using/preferences.html

    Bridge: https://helpx.adobe.com/bridge/kb/troubleshoot-errors-freezes-bridge-windows.html

    Dreamweaver: https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs6-cc.html

    Flash: http://helpx.adobe.com/flash/kb/re-create-preferences-flash-professional.html

    Illustrator: http://helpx.adobe.com/illustrator/using/setting-preferences.html

    InDesign: https://forums.adobe.com/thread/526990

    Lightroom: https://helpx.adobe.com/lightroom/help/setting-preferences-lightroom.html

    Muse (mac): https://forums.adobe.com/thread/1246022?tstart=0

    Photoshop: https://forums.adobe.com/thread/375776

    Photoshop elements: https://helpx.adobe.com/photoshop-elements/kb/preference-file-locations-photoshop-elements .html, http://www.photokaboom.com/photography/learn/Photoshop_Elements/troubleshooting/1_delete_p references_file.htm

    elements of first: https://helpx.adobe.com/photoshop-elements/kb/preference-file-locations-photoshop-elements .html

    First pro: http://www.mediacollege.com/adobe/premiere/pro/troubleshooter/trash-preferences.html

    If that fails, uninstall, clean (http://www.adobe.com/support/contact/cscleanertool.html) and reinstall

  • Need to throw an exception after a test of text corresponding to the openscript

    Hello

    I want to check a text using text matching test and I want to throw an Exception if the text is not there. If the text is there she must either continue normally.

    I tried this test of text matching. According to this, it's getting abandoned after

    () Web.document

    "\"/web:window[@index='0 "or @title ='Oracle BI interactive dashboards - Advance Planning']/web:document[@index='0']\" ").

    .verifyText ("Check result", "export",

    Source.DisplayContent, TextPresence.PassIfPresent,

    MatchOption.Exact);

    After this way can anyone please explain me (code)

    Concerning

    Harsha

    If you give verifyText(), script not give up failure, IE. script displays a warning text not found in HTML content

    If you give assertText(), the script will stop in case of failure.

    To throw an exception when the text is not found, use try-catch as follows...

    try {}

    Web.Window ("/ web: window [@index = '0' or @title = 'Oracle BI interactive dashboards - Advance Planning']/web:document[@index='0']")

    .assertText ("Check result", "export",

    Source.DisplayContent,

    TextPresence.PassIfPresent,

    MatchOption.Exact);

    }

    catch (System.Exception e)

    {

    failure ("could not find the export text");

    }


    See you soon,.

    Dembélé M

    [email protected]

Maybe you are looking for