Using LV DLL from C++

Hello,
I've read questions about calling LV DLL with front panel.
It is recommended to change the configuration to reentrant and not to use UI model.
I made this but my dll still does not display her front panel when called from my C++ application.
It seems to run in background.
Any help?

To show the front panel of your DLL you will need to use VI properties>>Window Appearance>>Customize. Set the Front Panel when called option. This will open the front panel to your DLL when the DLL is called.
If you call the DLL from a LabVIEW VI running in the user interface thread (a.k.a. execution system) you will get a deadlock if the VI called inside the DLL needs to do some work (such as showing its front panel).
To work around the deadlock, you must make sure that the DLL is called from a thread other than the user interface thread. To do so, first configure the shared library node to be "Reentrant" rather than "Run in UI Thread". Then make sure that the VI is not running in the UI thread by looking in VI Properties>>Execution>>Preferred Execution S
ystem
I think the same would apply if called from a C++ application.

Similar Messages

  • Using cvirte.dll from teststand

    I am trying to use cvirte.dll from teststand to automatically print test result reports. I am starting with the example sequence PrintEntireReportWhenFinishedTesting.seq that I found on the NI website. I want to change the print font attribute. The dll doesn't include prototype information so I need information on the parameters for the SetPrintAttributeEx function. Specifically what number refers to the ATTR_PRINT_FONT_NAME attribute and what are acceptable values for the value of this parameter.
    Attachments:
    PrintEntireReportWhenFinishedTesting.seq ‏37 KB

    Wendell,
    I believe this question was also posted in the TestStand category. Since this is more of a TestStand question, it was seen and already answered. Please see Using cvirte.dll from teststand.
    Thanks!
    Shannon R
    Applications Engineer
    National Instruments

  • I am using a DLL from VC++ labview6.1 crash upon loading the DLL

    Labview crashes when I load my DLL from VC++ that calls device net software. It is only _stdcall function. Sometime my whole PC crash upon loading it. I Appreciate any help from anyone......

    Your problem is most likely caused by a memory error. Insure that you are passing the correct data types (especially pointers) into the Call Library Function and make sure that if the DLL is expecting any memory to be allocated that the proper data has been created in LabVIEW (for instance, if the DLL was expecting a string of a certain length, LabVIEW would need to create a string constant which was long enough to satisfy the DLL). Also insure that there are not any race conditions (conditions within LabVIEW in which the order of execution is not defined) which could cause your DLL to access memory which has not yet been allocated. You can generally fix race conditions by using sequence structures. Also, make sure that your DLL cleans up any memory that it all
    ocates.
    Hopefully that helps,
    Ryan
    NI Applications Engineer

  • How to use a dll from webstart

    hi there, i have the following, for an app (it's going to run only on windows) i need some info from the registry and used some third party code for that, now, my question is, the dll file used has to be in the systemdirectory of the local machine. How could i achieve that when the program will be running from webstart ??
    1. By just copying the file into there...
    2. Or other, like rewriting the source code for the third party code
    thx

    @babybomb: Thanks a lot ! This hint really helps even after years !
    Here is my cookbook:
    How to enable Java WebStart applications ?
    ===================================
    ...including native libraries !
    1. Generate a Keystore
    Generate a keystore (*.keystore) file.
    Tool: keystore (JDK)
    Syntax:
    keytool -genkey -keystore mykeystore.keystore -alias myalias2. Pack native Libraries
    Pack native libraries (*.dll, ...) into Java libraries (*.jar).
    Tool: jar (JDK)
    Syntax:
    jar -cfv nativelib.dll.jar nativelib.dll3. Sign the Libraries
    Sign ALL your application�s libraries (*.jar) with your keystore by using the "jarsigner" tool.
    Tool: jarsigner (JDK)
    Syntax:
    jarsigner -keystore mykeystore.keystore myapp.jar myalias
    jarsigner -keystore mykeystore.keystore 3rdparty.jar myalias
    jarsigner -keystore mykeystore.keystore nativelib.dll.jar myalias4. Prepare JNLP File
    Prepare Java WebStart JNLP File.
    Syntax:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- JNLP File for My Application -->
    <jnlp
    spec="1.5+"
    codebase="$$codebase">
    <information>
    <title>My Application</title>
    <vendor>My Company</vendor>
    <description>My Application</description>
    <description kind="short">MyApp</description>
    <offline-allowed/>
    </information>
    <security>
         <all-permissions/>
    </security>
    <resources>
    <j2se version="1.5+"/>
    <jar href="myapp.jar"/>
    <jar href="3rdparty.jar"/>
    </resources>
    <resources os="Windows">
    <nativelib href="nativelib.dll.jar"/>
    </resources>
    <application-desc main-class="my.app.MyApp">
         <argument>arg0</argument>
         <argument>arg1</argument>
    </application-desc>
    </jnlp>
    5. JnlpDownloadServlet
    Copy the "jnlp.sample.servlet.JnlpDownloadServlet" from Java JDK into your web applications� web library directory "WEB-INF/lib".
    6. Prepare Deployment Descriptor
    Prepare your web application�s deployment descriptor (web.xml) to enable "JnlpDownloadServlet".
    Syntax:
    <servlet>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <servlet-class>jnlp.sample.servlet.JnlpDownloadServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>JnlpDownloadServlet</servlet-name>
    <url-pattern>*.jnlp</url-pattern>
    </servlet-mapping>
    7. Run the Application
    Yesssss !!!

  • How to transmit can message with extended id using Vcand32 dll from vector cancardx?

       Iam trying to transmit can message with  extended id through vector can card, data is received properly, but message id is not proper, only 11 bits of message id is visible in pcan tool.

    The thing is, the whole point of having separate accounts is to keep your data seprate from hers. So, any attempt to overcome this can be kludgy.
    For iPhoto 09 (version 8.0.2) and later:
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder. (I would note that some Lion users are finding Permissions issues with this.)
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • Error while using LabVIEW 8.2.1 Dll from Visual C++ 6.0

    I am getting an error while using a LabVIEW 8.2.1 dll from Visual C++ 6.0 application. This is what I am doing:
    1) Created a dll using LabVIEW 8.2.1 (I used a tutorial from NI knowledge base: "Creating DLLs from 6.0i". It is a temperature conversion VI; input DegreeF and get DegreeC out). Instead of LabVIEW 6.0i, I used 8.2.1. It created the dll Convert_Temp.dll successfully.
    2) Then I created a Visual C++ 6.0 application (used a tutorial from NI knowledge base: "Calling a DLL from Microsoft Visual C++ that was Generated by LabVIEW 6i). I could build the project and create an executable application F_To_C.exe.
    3) Then copied the LabVIEW dll Convert_Temp.dll into the folder where F_To_C.exe resides. Using windows explorer, went into that folder, and executed the application.  I got the following error:
    System Error 998 while loading the LabVIEW run-time engine (C:\Program Files\National Instruments\Shared\LabVIEW Run-Time\8.2\lvrt.dll).
    Convert_Temp requires a version 8.2.1 (or compatible) LabVIEW Run-Time Engine. Please contact the vendor of Convert_Temp to correct this problem.
    I checked the folder: C:\Program Files\National Instruments\Shared\LabVIEW Run-Time\8.2\. It has the file lvrt.dll.
    So why am I getting this error?
    GKB

    sounds like you need to install the LabVIEW 8.2.1 runtime. Not the 8.2 runtime engine.
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • How to use the DLLs which created from c++ in Java?

    And How to use the DLLs which created from JNI in C++?

    Huh?
    Are you asking how to do JNI - you should read the tutorial.
    Are you asking how to load it - then use System.loadLibrary()
    Are you asking what to do with the output from javah - put it in a C file and write some code, compile it into a dll.

  • Get the Picture object location path from crystal report using CRAXDRT.DLL

    Post Author: hpatel_it
    CA Forum: Crystal Reports
    Hi All,I am working on one project - Crystal report to SQL Report conversion and I am using CRAXDRT.DLL to open and read crystal report.I have done conversation of all controls but I am not able to get PICTURE object from Crystal report and also PICTURE object source path.I am using CRAXDRT.OLEOBJECT to get the path of the picture object.if someone have knowledge of CRAXDRT please help me.Regards,Harry

    You can get at specific objects using events,  but not a whole record.
    Can't think of any way of doign this at all...
    Ludek

  • Not able to GET_SCHEMA from MYSQL using mysql_ecma2.dll while creating MYSQL_ECMA

    i have made a MYSQL_ECMA.dll (using sql_ecma.dll) but when i create that ECMA it is unable to create get_schemafrom my sql
    Database=test
    table=HR
    public Schema GetSchema(KeyedCollection<string, ConfigParameter> configParameters)
    Microsoft.MetadirectoryServices.SchemaType personType = Microsoft.MetadirectoryServices.SchemaType.Create("Person", false);
    myServer = configParameters["Server"].Value;
    myDB = configParameters["Database"].Value;
    myTable = configParameters["Table"].Value;
    DataSet myData = this.MYSQLSchema(myServer, myDB, myTable);
    string[] MYSQLSchema =new string[myData.Tables["Columns"].Rows.Count];
    for (int i = 0; i <= myData.Tables["Columns"].Rows.Count - 1; i++)
    MYSQLSchema[i]=myData.Tables["Columns"].Rows[i].ItemArray.GetValue(0).ToString().Trim();
    string myattrib=MYSQLSchema[i];
    if (myattrib == "EmployeeID")
    personType.Attributes.Add(SchemaAttribute.CreateAnchorAttribute(myattrib, AttributeType.String));
    else
    personType.Attributes.Add(SchemaAttribute.CreateSingleValuedAttribute(myattrib, AttributeType.String));
    Schema schema = Schema.Create();
    schema.Types.Add(personType);
    return schema;
    public DataSet MYSQLSchema(string server,string database, string table)
    myconnectionc =("Server = '" + server + "';Initial Catalog='" + database + "';Integrated Security=True");
    conc =new MySqlConnection(myconnectionc);
    cmdc =new MySqlCommand();
    cmdc.CommandType=CommandType.Text;
    string cmdtextc="Select COLUMN_NAME from Information_Schema.Columns where TABLE_Name = '" + table + "'";
    cmdc.CommandText=cmdtextc;
    cmdc.Connection=conc;
    adapter =new MySqlDataAdapter(cmdc);
    dac =new DataSet();
    adapter.Fill(dac, "Columns");
    return dac;

    It must be problem with your query. You are converting date into DD/MM/YYYY format and passing it to the query. As per my knowledge, MySQL default date format is YYYY-MM-DD. YYYY-MM-DD is not equal to DD/MM/YYYY. Hence you would not get any result. I would suggest you to validate the query. yOu try executing query directly in mySQL
    select edate, particulars, chequeno, fromto, deposit, withdrawal, cleared,cdate, details from passbook WHERE edate BETWEEN 01/01/2007 and 31/12/2007 order by edate desc
    If you are able to execute above query in MySQL without fail, then it is something we may need to investigate further. Hope above query may not yields you any records. If so, that could be the problem. You may need to convert your date (SimpleDateFormat) in below format:
    YYYY-MM-DD.
    It should work. Let me know, still if you have any questions further.

  • [Q] Using a VC++ DLL from LabWindows

    I need to create a DLL that uses shared memory. I can do
    this with Visual C++ but haven't succeeded doing it with
    LabWindows.
    So now I want my LabWindows executable to use the VC++ DLL.
    I'm having trouble because some identifiers are "redefined"
    (defined both in the needed VC++ include files as well as in
    CVI include files).
    Can someone tell me either how to create a DLL that uses
    shared memory in LabWindows (this is my preferred solution)
    or else how to use a VC++ DLL from LabWindows?
    My ultimate aim is to use the shared memory to share
    instrument session handles, since we need to be able to talk
    to the same instrument from more than one process. Has
    anyone already done this?
    TIA for any help ...
    B
    * S
    ent from RemarQ http://www.remarq.com The Internet's Discussion Network *
    The fastest and easiest way to search and participate in Usenet - Free!

    Hello andre,
    today I have read your message of the 20th Sept. 1999 in the NI-Newsgroup.
    And I am also trying to use SHARED MEMORY.
    But I have no experience with it. Could you help me?
    Do you have succeded ?
    With best regards,
    CHRISTIAN ZIPPER
    ande schrieb in im Newsbeitrag:
    [email protected]..
    > I need to create a DLL that uses shared memory. I can do
    > this with Visual C++ but haven't succeeded doing it with
    > LabWindows.
    >
    > So now I want my LabWindows executable to use the VC++ DLL.
    > I'm having trouble because some identifiers are "redefined"
    > (defined both in the needed VC++ include files as well as in
    > CVI include files).
    >
    > Can someone tell me either how to create a DLL
    that uses
    > shared memory in LabWindows (this is my preferred solution)
    > or else how to use a VC++ DLL from LabWindows?
    >
    > My ultimate aim is to use the shared memory to share
    > instrument session handles, since we need to be able to talk
    > to the same instrument from more than one process. Has
    > anyone already done this?
    >
    > TIA for any help ...
    >
    >
    > B
    >
    > * Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
    > The fastest and easiest way to search and participate in Usenet - Free!
    >

  • How use DLL from PL/SQL

    Dear Mr/Mrs,
    My system is
    1.Oracle Database 10g express edition(with apex 3.2)
    2.Windows 2003 server
    3.GSM Modem(usb cable + Vendor Provided dll for developer)
    4.Mobile SIM card
    Now ,i want to send SMS from Database.
    N.B: email to sms is not my intention
    Thanks
    Engr.M.K Chowdhury

    Hi,
    What's wrong with the last answer Re: Using DLL from apex ?
    Regards
    Peter

  • Trying to create DLL from VI to use in TestStand.

    I trying to create a DLL out of an existing VI file.  The VI has about 4 inputs and about 3 outputs.  If I go to Tools >> Build Application and select the Build Target as a "Shared Library (DLL)" i get a dll after the build; but when I try to call that DLL from teststand, it doesn't recognize any of the inputs or outputs.  How do I build a DLL so that teststand will reconize the inputs and outputs?
    Solved!
    Go to Solution.

    The controls and indicators are connected to the connectors.  Also, answering an earlier post, the prototype information for the inputs and outputs are not automatically displayed. I can manually define the prototypes, but then the question is how does each prototype link to its corresponding parameter (by name?). I've also tied creating just a simple VI that has just one string input and one string output.  I built the VI to a DLL and tried calling in TestStand and i get the same results.  I've inserted the resulting header file after that build.  Which, by the way, looks exactly like my other created DLL's header file.  The difference in bold(the name of the VI). Which makes me thik that my build DLL process might be off.
    #include "extcode.h"
    #pragma pack(push)
    #pragma pack(1)
    #ifdef __cplusplus
    extern "C" {
    #endif
    void __stdcall String_input_output(void);
    long __cdecl LVDLLStatus(char *errStr, int errStrLen, void *module);
    #ifdef __cplusplus
    } // extern "C"
    #endif
    #pragma pack(pop) 

  • I just installed LV2011 and one dll from my vi won't load with the error "application configuration is incorrect"

    I just installed LV2011 and one dll from my vi won't load with the error "application configuration is incorrect", which is Windows lingo for "missing package dependencies".  All the computers at my company with 2010 loaded seem to do OK.  When I do a Dependencies Walk I get missing Visual C debug dll's missing plus IEshims and wer which both have a whole tree of dependencies missing on my machine.  The Windows install is the same "Windows XP version 2002 Service Pack 3" on my PC and the working PC's. So I'm thinking I have to uninstall 2011 and go back to 2010.  Is this correct?  Those VC debug dll's were installed on the machines with 2010 in them but were not installed in mine.
    I've heard the advice to recompile the dll with debug turned off but I don't have access to the source code.
    Thanks in advance.

    u87 wrote:
    Thanks for the reply.  This at least tells me that going back to LV2010 is not likely to solve the problem.  The missing dll's are:
    MFC90D.dll
    MSVCR90D.dll
    IESHMS.dll
    WER.dll
    And, once again, IESHMS and WER have other dependencies.  So perhaps i need to install the Visual C++ development environment.
    IESHIMS.dll is an Internet Explorer DLL that gets usually delay loaded by shdocvw.dll. As delay load it can not cause DLL load errors but only runtime errors. Maybe your DLL has it as direct dependency but that is unlikely since it does not have a documented interface.
    WER.dll is Windows error reporting for Vista/Win7.
    MFC90D.dll is the Microsoft Foundation classes and MSVCR90D.dll is the MS C runtime library, both as debug variant.
    So all the DLLs you mention are actually MS DLLs! You haven't identified the DLL that you try to access in LabVIEW that causes these error messages. IESHIMS and WER are usually delay loaded by any component that needs it and should not likely be used by non MS code.
    What is the DLL you try to load into LabVIEW and by whom? Get the provider of that DLL to provide you a non Debug build of the DLL. Installing Visual C on all the machines just to make the DLL load is not a solution, besides that it is likely not legal since I doubt you have that many licenses.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Ldapssl_client_init always returns -1 when using nsldapssl32v50.dll

    We have an iPlanet Directory Server v5.2 installed and SSL has been configured on it.
    When we call ldapssl_client_init(CERTDBPath, NULL) we always get a the return value as -1.
    We used nsldapssl32v30.dll and the corresponding lib and tried the same program and it worked perfectly fine.
    Now the question is why does this call fail when using the 5.0 version of the library.
    We have tried calls to ldapssl_client_init in the different ways like
    --> ldapssl_client_init("D:/Program Files/Sun/MPS/alias", NULL)
    with the cert7.db in this path. This failed
    --> ldapssl_client_init("D:/Program Files/Sun/MPS/alias/slapd-mydb-cert7.db", NULL)
    This also failed
    We need to use the v5 of the library bcoz the older versions are not compliant with LDAP v3 for referral support.
    Our current environment is Win2k Server SP4 and iPlanet Dir Server 5.2.
    Please help us sort out this issue.
    Thanks
    Raghu

    The function "ldapssl_client_init" returns -1, if I use LDAP SDK 6.0 binaries (source downloaded from http://wiki.mozilla.org/LDAP_C_SDK and compiled). It returns same error code i.e. -1, if we use precompiled binaries.
    But if I use the old LDAP 5.2 binaries, it works fine.
    Here is a sample code that I used to test ldapssl_client_init() on RHAS3.0:
    #include <ldap.h>
    #include <ldap_ssl.h>
    #include <stdio.h>
    /* Initialize client, using mozilla's certificate database */
    int main(void) {
    /* "/home/infwaer/test/" is the folder that contains cert7.db and key3.db*/
    if(ldapssl_client_init( "/home/infwaer/test/", NULL ) < 0) {
    printf( "Failed to initialize SSL client...\n" );
    return( 1 );
    else
    printf( "Initialized SSL client...\n" );
    I used the following command to compile it with 5.2 binaries, and was able to successfully call the function ldapssl_client_init:
    gcc ldapclient.c -I/home/infwaer/nsldap/5.2/RHAS3.0/include
    -L/home/infwaer/saurabh_review/lib -lldap50 -lnspr4 -lplds4 -lplc4 -lsoftokn3 -lnss3 -lssl3 -lprldap50 -lssldap50 -ldigestmd5 -lsasl
    But when I compiled it using 6.0 binaries using the same command:
    gcc ldapclient.c -I/home/infwaer/nsldap/6.0/RHAS3.0/include
    -L/home/infwaer/saurabh_review/lib -lldap60 -lnspr4 -lplds4 -lplc4 -lsoftokn3 -lnss3 -lssl3 -lprldap60 -lssldap60 -ldigestmd5 -lsasl
    It gave the error "failed to initialize" (as written in the code !)
    Please help me out; n let me know if it is a known issue with LDAP SDK 6.0. Or we need to do some special settings for version 6.0 to work properly.
    Thanks & Regards,
    Saurabh

  • Security exception when trying to call a DLL from an applet

    Hi all,
    I really hope someone out there can help me. I'm trying to call a windows DLL from an applet but always get some error when the call to the DLL comes. If I run it on the command line (calling a dummy main function that only calls the dll) I don't get any error. However, with the -Djava.security.manager, I get an ExceptionInitialiserError. When running it in a browser, I seem to get any of three errors, the above, securityAccessControlException (as I was expecting) and even NoClassDefFoundError.
    I realise of course that this has to do with the permissions in effect but nothing seems to happen when I change the policy file, so I have to feeling that I'm chaning the wrong file. The one I'm using is the one the JRE entry in the registry is pointing to, Java Runtime Environment->CurrentVersion...
    I even tried giving everything in the applet's directory AllPermission.
    So what I'm wondering is this. Is there any way to check if your policies are actually working and when you update the files, what do you need to do to make the changes take effect?
    Best regards,
    G�sli

    I have the same problem. Have you solved your problem, if so please let me know what the solution is.
    Einar �rn

Maybe you are looking for

  • BT Home HUB 5a and Yosemite

    HI fellow Brit Telecom clients: This is a post I just filed on the main Yosemite wifi discussion thread. STARSHIP YOSEMITE CAPTAINS LOG: You wrote: British Telecom (BT) HomeHub dual-band routers use the same SSID and password for both bands by defaul

  • In SD i am looking to add some custom fields to the delivery document.

    In SD i am looking to add some custom fields to the delivery document. can any one help me out.

  • Procurement with account assignment category F

    Hiiiiiiiiiiiiiiiiii Experts, I have a requirement.I am making a PO with account assignment category 'F'. There i am giving production order in account assignment tab of item in PO.Now after doing GRN with movement type 103 and QI with mov. type 105 i

  • Iphone 4 flickering

    After upgrading to ios 7.0.4 the iphone 4 screen flickering especially after trying to show images from the photo album and when trying to show internet page containing images - what is the problem?

  • Hibernate without primary key?

    i need to use hibernate for the table which do not have primary key. I found many explanation about there should not any table without primary key. plz let me know for this case- user table with unique pk userId group table with unique pk groupId and