How unload us a DLL with several different COLD?

Hello world

I am designing an application that implements several functions of a DLL that I build.

I call two functions one after another to get the results of my functions. The first function (Read_Property) made many operations and saves its information in a layer of data inside the DLL. (Basically certain static arrays of string). The second one (get_Data_Array) is just a "get" function which returns the string at a position that is defined in a table.

The first version of my application was a state machine with a façade where the user just had to enter the parameter of the function, then press a button. I wasn't unloading of the DLL at any time because I thought that LabVIEW makes itself when I close the instance of the application. I got excellent results and everything was fine and that I could make multiple calls to my pair of functions without having any problem. However, I discovered a bug when I close the instance of my application and I started another. My first function got a timeout for no apparent reason. I worked with my DLL in a context of C and I know that this kind of bug appears when multiple instances are running at the same time. After a time out, the only thing I could do to fix this was to restart LabVIEW.

So, I think my problem comes from the fact that there is interference in some static in the first function variables because the DLL has not been discharged properly. After that, I tried to unload the dll in the last State of my state machine because it wipes out all static variables, but it was not a success. The same problem was still present. After that, I tried encapsulate my problem to a single VI. So I just tried to run my 2 functions for one after the other and then unload the DLL by connecting an empty path both of em. As my first version, after two or three tracks of my VI, I am a time-out again.

My VI looks like this:

Why does my DLL doesn't unload?

Thank you

I have some progress here.

I just added some check to see if the DLL was attach/detach, so I would like to know if the DLL was unloaded or not.

After a lot of testing, I realized that my first version was loading/unloading successfully my DLL every time.

However, I still have my time-out and I bet it's because different threads execute my DLL at the same time.

I'm going to do another topic for my problem, because it is not the same topic.

Thank you for your help.

Tags: NI Software

Similar Questions

  • How to save a database with several headphones

    Hi all

    Could if it you please let me know how to save a database with several headphones?

    Just a thought:-could save us a listener with several databases also?

    Thank you

    Published by: user13332773 on June 2, 2011 23:39

    If it is really necessary for a database to single instance by using different local listeners, you must set the instance parameter LOCAL_LISTENER to the listening port address list: Please read http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/listenercfg.htm#CHDCCHIC.

    Edited by: P. Forstmann on June 3, 2011 08:49

  • HP Officejet 6500 a how to scan a document with several pages in a single file?

    HP Officejet 6500 a Plus e-All-in-One - E710n

    Windows 7 (64-bit)

    How to scan a document with several pages in a single file?  After each scan, my old printer (psc 2110) asked if I wanted to scan another page.  In the end, I got a PDF with multiple pages.

    This new creates a file for each page, and I can't find a way to create a PDF with multiple pages.

    Hi mpw101,

    You must press the Add/Remove button, to add pages additionla scanned to the existing file. If you do not see this button try decreasing the analysis DPI setting. Let me know if this helps you?

  • How to connect the Ombudsman with several bpel process

    Hi Please someone tell me how to connect the Ombudsman with several processes bpel in soa 11g

    And here

    http://eoracleapps.blogspot.com/2009/11/how-to-call-synchronous-BPEL-process.html

  • How to print an article with several application

    I was looking for an answer in the forum, but I couldn't find it. :(

    Anyone know how to print an article with several application? This section is on the page that has several sections.

    Thank you

    You can print a report or an entire page of dashboard, but unfortunately you can not print a section 'reports' with 'click '. Users will need to print each report separately.

  • For the complex data type, how to generate the Dll with compatible interface to C/C++

    Hello

    I used the Labview FPGA module to develop test equipment. Now, I need to write a driver that is to be a Dll with compatible interface to C/C++ for this equipment. So that my client who is familiar with C/C++ can call the driver without any study on labview. But I had a few problem on how to convert labview for C/C++ data complex data type. To clearly explain to my question, I have attached a simple example. (see attachment) I try to generate a Dll for the attached example VI and get the the function prototype at the head of the files as below:

    ' void OpenFpgaReference (LStrHandle * RIODevice, TD1 * errorIn, LVRefNum * FPGAVIReferenceOut, TD1 * errorOut).

    As you have known, the type of data "LStrHandle * RIODevice" and "LVRefNum * FPGAVIReferenceOut" Labview data format are. C/C++ do not have this kind of data type and can not reconige it. As a result, I can't call the Dll of C/C++ programming language. How to convert these two data type of labview for the C/C++ compatible data format, and then build the Dll? Anyone know about this?

    The answer is really apprecaited! Thank you in advanced.

    Ivan.Chen wrote:

    As I found in the following article:

    http://digital.NI.com/public.nsf/WebSearch/FB001AA027C8998386256AAD006C142D?OpenDocument

    LVRefNum is the name of resource of LabVIEW VISA or refnum, and "it is impossible to convert LabVIEW VISA name of resource or refnum VISession valid ID."
    This means that external code modules can not access & control the session VISA which is open by labview. But for my purposes, I will not attempt to access this VISA extenal code(C/C++) session. I just hope that save this session VISA in the external code once I opened it in Labview dll; and pass it to the labview dll when needed. While I have not need to login again when I need to control the device. Is it possible to do?

    A LVRefNum is really just a single int32 value. Its meaning is useless for other environments than those who created it so that you Michael not any what in C/C++ caller but pass it back to other functions in your DLL, but this often isn't a problem at all.

    You can take the following statement of the LabVIEW extcode.h headers and add them to your delabviewed header files to make it work in such a way.

    #define Private (T) typedef struct T # _t {void * p ;} * T}

    Private (LVRefNum);

    The LStrHandle you must set a standard C string instead in your export DLL and document what is the size of the string buffer should have if it is an output parameter.

    TD1 error clusters should also be divided into their parameters (C compatible) separate for all items or just to the left of suite entirely.

    Rolf Kalbermatter

  • How to create a subform with several rows initialized?

    I have a repeating subform on my form that should start with several lines initialized.

    I can create several blank lines by setting the binding "repeat subform for each data element" and set the number of 'min', but I would like to have values in one of the columns so that doesn't happen.

    I can create multiple instances of my subform named and initialize the value of the column in question, but then if I have the "repeat subform for each data item" checked I get additional dups, but the first row and the button Delete (right-click action "this.parent.instanceManager.removeInstance (this.parent.index);" ')»» and Add button (click an action "_rates.addInstance (1)" "") erratic behavior.  I mean here the button Add adds sometimes lines with values that have been deleted previously, and the delete button sometimes a warning saying something like "topmostSubform [0]: Page1 [0]: rates [10]: delete_button [0] .click on Index value is out of range.

    There is no connection to a data source where I could get the values for the column, I want to initialize.  In my opinion, I'm close, if only I could find the correct settings for the links palette.

    Thanks for your suggestions!

    If you have columns and rows, why not use a table instead of subform...

    Check the setting of binding to "repeat the line for each data item.

    Add the button 'Delete Row' to each line in the last column.

    Add the button 'Add Row' under the Table.

    Add text fields to the columns that you want the data displayed / modified by the user.

    I hope this helps.

    If not, let me know...

    Thank you

    Srini

  • Cp6: How to stop a slide with several buttons in a nonlinear presentation?

    Hello

    I would be very grateful for a solution to this issue, as I failed to find one yet in this forum.

    The presentation is non-linear, which means that the first slide is a kind of menu that you can choose another slide to explore and always comes back to the first.

    Each slide has several buttons that activate different audio files, and there is a button on the arrow in the lower right corner to jump to the first slide.

    The problem is that the slide does not stop after that you click on some of the audio buttons and continue on the next slide (instead of take a break until the user clicks on the arrow button). When I click a few buttons and listen to audio, eventually the slide automatically continues to the next slide.

    I tried:

    • Add button click box with "break project up to what the user clicks
    • change all the buttons for timing-> break after...
    • change only the arrow for Timing-> button pauses after...
    • and will not take unnecessarily long time to slide

    Any ideas?

    Thanks in advance,

    The best

    Acted

    You don't say 'how' to play the audio? In any case, the default behavior of interactive objects that trigger a simple action is out the read head. If you replace the simple action by a standard tip action one line, the playhead is not released. Watch this video (posterous is down once, again can not point to my blog):

    http://www.YouTube.com/watch?v=M3nKi-DB6Fw

    Lilybiri

  • How can I close Firefox with several tabs without message

    It drives me crazy. I'm using Firefox on Linux Mint 17 40.0.3 to the top of a tower Dell Latitude I5. If I have more than one tab open and try to close it, I get a message:

    Do you want Firefox to save your tabs for the next time, it opens?

    I click on "Do not ask next time" and "exit". He does not save this preference.

    So I did some research, went up to about: config and change the following parameters to false:

    browser.tabs.closeWindowWithLastTab; false
    browser.tabs.warnOnClose; false
    browser.tabs.warnOnCloseOtherTabs; false
    browser.tabs.warnOnOpen; false

    but this message still comes up. Is this a bug or a feature? How can I get this preference to stay?

    Thanks in advance.

    If browser.showQuitWarning is set to true, you will get this warning message.
    You must toggle the pref to false with a double click to disable this warning.

  • How to make a transition with 2 different videos?

    Hello

    I want to synchronize two different angles of a video clip with audio of one.

    I put the video and audio of the original on 1 video in the timeline

    and the second camera angle, (video only) 2 video in the timeline.

    My problem is, I want to make a transition between two videos, but because the videeos are in different sections I am not able to.

    Y at - it an easier way to do it, rather than just pulling the 2 angles of video on the master on 1 video?

    Thank you

    Dave

    You can always slice high video at points when you want to display the video background and set its opacity to zero for these segments.

  • VM is frozen - it cannot kill with several different methods.

    Greetings!

    I have a Ubuntu Server VM running on 1 of my boxes of ESX 4.0 I can't do anything with.  It shows that it is running, but I'm not able to turn off, reset, snapshots, backup with VDR - anything!  When I try to perform an action on it, it says "another task is already underway."  I looked through the events of the virtual machine, and there are not hung tasks.

    Here are the steps I've tried.

    1 vmware-cmd & lt; VM config file path & name & gt;. hard stop

    2 vm-support - X & lt; VMID & gt; -This does not work because if I run this without the VMID it does list even the server I am killing in there.

    3. a kill-9 PID - this does not work because it says that there is no such process.

    It is a new installation of ESX, not an upgrade.

    Someone at - it any other suggestions on how I can get this virtual machine out of his frozen state?

    Thanks in advance!

    Adam

    Have you tried the console service perform a "service mgmt-vmware restart' and try again with the customer?

  • How to join two fields with slightly different data

    I have two columns, I need joined, both keep the columns of numeric data, but are of type varchar2 (6). The problem is that one of the columns keeps leading zeros to ensure that all 6 characters are used, but not the other. And columns preserve leading zeros may vary how many zeros are in the number-based computing.

    For example, the column with zeros can contain the number 4200, which would mean that he would remain with 2 zeros as 004200. Or it could contain 320, which means that he would remain with 3 zeros as 000320.

    The other column that does not have leading zeros not only keeps the number, so, in the example above, it would keep 4200 and 320 respectively.

    Can someone help on how to join these columns so that they match? I guess I have to delete the zeros in one or add zeros in the other? I tried to use the trunc with zeros on the ground, but it did not work...

    The following sql code:

    M06.mbr06_prv_id has no zeros, prv647.provider_id zeros. See bold below...

    SELECT
    M06.mbr06_prv_id,
    prv647.Site_ID
    Of
    Odw.mbr06_mbr_elig m06
    JOIN THE
    Odw.prv647_prov_exp prv647
    WE
    M06.mbr06_prv_id = prv647.provider_id
    WHERE
    M06.mbr06_subs_id = "999999999 '

    BTW, I have no control on how this data is represented in a table... !

    Hello

    user12296489 wrote:
    ... I guess I have to delete the zeros in one or add zeros in the other?

    Yes, this is how I see.
    LTRIM removes given characters from the beginning of a string. LPAD adds characters at the beginning of a string. I would use LTRIM in this case, because if you use LTRIM, you probably need to handle a single column. If you use LPAD, you have to play with the two columns, as one of them still has the extra 0, and it sometimes needs them.

    I tried to use the trunc with zeros on the ground, but it did not work...

    TRUNC is working on the kinds or DATEs; you have VARCHAR2s. You can convert them to numbers, but then you risk of errors to cause bad data (and it linked to the wrong data).
    >

    The following sql code:

    M06.mbr06_prv_id has no zeros, prv647.provider_id zeros. See bold below...

    SELECT
    M06.mbr06_prv_id,
    prv647.Site_ID
    Of
    Odw.mbr06_mbr_elig m06
    JOIN THE
    Odw.prv647_prov_exp prv647
    WE
    M06.mbr06_prv_id = prv647.provider_id
    WHERE
    M06.mbr06_subs_id = "999999999 '

    If you are certain that m06.mbr06_prv_id never has extra characters, whereas the join condition can be

    ON   m06.mbr06_prv_id   = LTRIM ( prv647.provider_id
                                      , '0'
                           )
    

    If this isn't the case, CUT then the two columns.

    BTW, I have no control on how this data is represented in a table... !

    Report a bad design is for people who don't have not this control. Numbers are the number of columns, not VARCHAR2. If the ID really needs to be strings, they should be validated and standardized once, when they are placed in the table, no more, and more, in all queries that use these columns.

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all tables and also post the results desired from these data.
    Explain, using specific examples, how you get these results from these data.
    Always tell what version of Oracle you are using.

  • How to draw a graph with several axis xy enter?

    Hello

    I have problem in xy graph, the graph xy can only display 1 signal the y-axis of entry (as you can see in the attachment)

    Is it possible to draw the graph xy with 2 go? Or maybe there's another type of graph as possible to do?

    Note: the x axis must be an entry too (not compared to the time / sample).

    Answers and advice are welcome.

    Best regards

    Alvin Chandra

    You ask for a second scale of Y on the graph?

    If so, right-click on the scale of the existing, select "Double ladder". This will create a second scale. You can then (if you wish), right-click on the new scale a select 'Swap sides' to put it on the other side of the chart.

    You ask about adding a second plot?

    If Yes, then you must group your arrays of X and Y points in clusters and build those in a table:

    The x-axis is always an entry on the XY graph. You just need to change the title of the axis. Way easier to do is to double-click the axis title and type the new name.

    Rob

  • How get lined up pages with various/different heights in a low printing sheet?

    Hi all

    I don't have an idea if it is still possible - but I want to align my various pages on the background. More small one vertical automatically aligned in the middle of the largest document (see photo).

    Bild 2.png

    If I put up the first smaller page (set up a new document with small size) and add a new page with higher dimensions, he lined up at the top (see below).

    Bild 3.png

    BUT IT IS NEVER ALIGNED ON THE BOTTOM.

    Help someone?

    Thank you very much!

    When you create a new page, you choose control facing Pages (two pages side by side) or not. Pages not connected to, you can use the Page tool to drag pages around the mount table.

  • How to extend a line with several anchor points

    Hi, the image below is expanded to show all the anchor at the end of the cord.  The blue lines are the power cord and the green lines are in the shade.  The image below which gives you the image at this time.  What I try to achieve is to extend the string to the left so that I can use the image as the background for a very long area 2561px by 141px.  Appreciate your help

    Screen Shot 2015-06-18 at 6.13.51 pm.png

    Screen Shot 2015-06-18 at 6.24.10 pm.png

    Use the direct Selection (NOT the selection tool) tool and the marquee your selection around the area that you have demonstrated. Then zoom out and you will then be able to move these points to where you want.

Maybe you are looking for