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

Similar Messages

  • Problems in using Labview DLL with TestStand!

    Hi,
    I tried to put the VI's to create a TCP/IP Connection, read/write Data to it and close it inside a LabVIEW DLL and use these functions with TestStand.
    The problem is to get access to the ConnectionID generated as TCP Network Refnum in LabVIEW.
    I don't know how to specify the prototype entry for this Refnum in LabVIEW and how to read it with TestStand.
    Another try to pass an ActiveXReference of SequenceContext and use the SetValIDispatch method to set a local variable (Type: ActiveXReference) to the returned ConnectionID of the TCPOpen.VI wasn't successful too.
    It seems to me that the connectionID isn't a normal ActiveXReference.
    Regards,
    Sunny

    Hi Sunny -
    You should treat this parameter as a pointer to an int when calling the DLL from TestStand (or any language like C or C++). Note that you can't do anything with the value outside of LabVIEW since it only has meaning inside of LabVIEW. You can only pass it around for use in other VIs you call from TestStand.
    Hope this helps....
    Kyle G.
    National Instruments
    Kyle Gupton
    LabVIEW R&D
    National Instruments

  • Problem calling more than one instance of a dll from TestStand

    Hi,
    I've posted this message in the LabWindows forum a few days ago and haven't gotten any answer. I have made a DLL with the evaluation version of LabWindows 7.1 to connect to a Telnet server and perform various commands. This DLL is used with TestStand 3.1 . In TestStand, I have to connect simultaneously to the same Telnet server twice to start an application with both of those connection, with different parameters. I use Threads in TestStand to call the DLL and everything seems to be fine on that side. I enter the DLL at the same time for both threads but it seems that the 1st thread waits until the 2nd thread is at the end of the function before he executes the InetTelnetOpen command to start the Telnet session. Is it normal that we can only have one Telnet connection at a time?
    To see that I've placed some time stamps in a log. For the first Thread, almost a minute passes by between the first 2 time stamps but in the 2nd thread it take less than a second.
    Yet, they both wait for eachother to exit the DLL as the time stamp at the end of the execution is the same.
    I really need some enlightenment here ;-)
    Louis
    Attachments:
    TelnetTest.txt ‏3 KB

    Tiwi,
    The blocking that InetTelnetRunScript does is probably there for a reason. That method is probably not safe for multiple threads to call into at the same time. There is likely another way to do what you are trying to do that can be done in parallel. Perhaps with lower-level telnet function calls. I recommend you post to the CVI forum asking if there is another way to do what you are trying to do from multiple threads in parallel. This does not sound like a teststand issue. If you are calling into your dll from multiple testand threads, then the code in your dll function is being executed in parallel. The cvi function you are calling however, might not be reentrant (reentrant means able to be called by multiple threads in parallel) so it is making one of your threads block until the other completes. I suspect there is a different way to do what you are trying to do that will not have this problem, but I think the changes that you will need to make will be in the dll and not on the teststand side. I recommend you post to the CVI group and explain what you are trying to accomplish and see if they have a solution for you.
    Hope this helps,
    -Doug
    P.S. Each process on the Windows operating system (of which teststand is one) can only load one copy of any particular dll at a time. Also, loading multiple copies is not something that would be likely to solve the problem you are running into. One possibility is to use the call executable step type and create an executable that does what your dll function does, but that is probably not the best solution and might still end up blocking at the same location. The best solution is probably to use an alternate method of accomplishing whatever you are trying to do with the telnet function you are calling that does not have the limitations of that function.

  • How can I pass a Variant to a C++ DLL from TestStand?

    I have a VARIANT that is being returned to TestStand via COM. The variant contains a structure of integers and strings. The integers are not uniformly sized... some are 8,16, and 32 bit. Rather than try to find a way to decode this information in TestStand, I would like to pass it to a C++ DLL to do the decoding and return the information in a readily usable format. I also have need to take the aforementioned data types, send them to a DLL for conversion into a VARIANT, and then pass this variant to a COM object. Can someone please explain a way that I can use TestStand as a pass-through for VARIANTs between a COM object and a C++ DLL?

    Hi,
    To pass a VARIANT to a C++ DLL in TestStand, you will need to create a custom data type.  From the sequence, change the View ring to Sequence File Types.  Right-click to insert a new Customer Data Type and select Container.  Now you can right-click to insert a field, which you can specify what data type it is.  Insert as many fields as needed.  After you have entered those in, right-click on the Custom Data Type name and select Properties.  Go to the C Struct Passing tab and click the "Allow Objects of this Type to be Passed as Structs".  Change packing to correlate with the C++ compiler you are using and also configure the properties for each field.
    Once you have done this, you will be able to pass that VARIANT as a struct to a C++ DLL.
    Thanks,
    Terry S.
    Staff Software Engineer
    National Instruments

  • 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.

  • 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.

  • 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) 

  • Exe error from missing cvirte.dll

    I created an .exe on a develoment machine and moved it over to another machine. When I run the .exe on that machine, I get the following error:
    "The program can't start because cvirte.dll is missing from your computer. Try reinstalling the program to fix this probelm."
    I tried copying the cvirte.dll from the system32 folder on the development machine to the instlal machine and the same error occurs.
    the install mahcine has RT2010 and RT2013 installed and the .exe was developed uisng Labview 2013
    Does anyone have any suggestions on how to solve this issue?

    Does anything in your LabVIEW program use a CVI .dll or executable?  It sounds like what you need to do is install the CVI Run-Time engine onto your computer.
    Here is also a Knowledge Base article with a little bit of information about the error.  http://digital.ni.com/public.nsf/allkb/6B7641BE351DE6E486256AA40055673D
    Jesse S.
    Applications Engineer
    National Instruments

  • Debbugging MFC DLL with TestStand.

    I am in the process of evaluating TestStand and am very impressed with the tool. I created an MFC DLL with my existing C++ test code and have succesfully executed it through Teststand using the flexible prototype adapter. What seems to be missing is the ability to debug the DLL in Visual studio. I'm not sure if I need to have Visual Studio reference TestStand for DLL testing or visa versa. Please advise, as this is the last item I need to confirm prior to purchase. Is this a feature on version 2.0 ?? Thanks in advance.

    Mark-
    You can debug DLLs from TestStand that were created as debuggable DLLS in their original ADE by launching the TestStand Sequence Editor (\TestStand\Bin\SeqEdit.exe) from within your DLL's ADE. In your case you would run the SeqEdit.exe as an external process from within the Visual C++ development environment.
    Here is the description of how to do this from pg 12-12 in the TestStand User Manual that should already be installed on your computer under Start>>Programs>>National Instruments TestStand>>Online Help
    "To debug a DLL, create the DLL with debugging enabled in
    LabWindows/CVI or in another ADE. To debug DLLs, you must launch
    the sequence editor or run-time operator interface from LabWindows/CVI
    or the other ADE. In LabWindows/CVI, you use the Select
    External
    Process command in the Run menu of the Project window to identify the
    executable for the sequence editor or run-time operator interface. You then
    use the Run command to start the executable.
    If you select the Step Into command in TestStand while execution is
    currently suspended on a step that calls into a LabWindows/CVI DLL that
    you are debugging, LabWindows/CVI breaks at the first statement in the
    DLL function."
    Hope this helps!
    Regards,
    Richard McDonell
    National Instruments

  • How to display non modal dialog box in a Dll call from TestStand implemented in visual c

    Dear Jason F.
    Applications Engineer
    National Instruments
    Hello
    I did the same way you told me
    the non modal dialog appeared and
    system hangs and
    giving the error message
    ""SeqEdit.exe-Application Error
    The instruction at �0x047fc5b0� referenced memory at �0x047fc5b0�. The memory could not be �read� ""
    please solve my problem
    and thanks for yours early response
    you can email me at
    [email protected]

    Hi Mkehret,
    Does your dialog have ActiveX controls on it? If your DLL dialog uses ActiveX controls and is not programmed in a certain manner it can hang because of a conflict in the threading model used by the TestStand Engine that is calling into your DLL and the model that is required by the MFC ActiveX Container. If you are using ActiveX controls in your dialog, you need to make special considerations for the threading model MFC dialogs that use ActiveX controls need in order to work properly. The example under \Examples\MFCActiveXContainerDlg illustrates how to appropriately handle this situation as well as explaining why it is necessary.
    Note: The above example displays the dialog as modal, but this is irrelevant to the problem I am describing.
    Again for information on properly creating a dialog class object and displaying it as non-modal refer to the information on MSDN that I referred you to in this post:
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000E98A0000&USEARCHCONTEXT_CATEGORY_0=_8_&USEARCHCONTEXT_CATEGORY_S=0&UCATEGORY_0=_8_&UCATEGORY_S=0
    If your dialog does not use ActiveX controls or after trying the programming method illustrated in the "MFCActiveXContainerDlg" example TestStand still hangs when calling your DLL, try calling your DLL from another environment just to make sure whether the DLL works at all. If the DLL works properly when called by another environment (e.g. VB, VC++, LabVIEW, or CVI), please submit a MINIMAL and REPRODUCEABLE example source project for your DLL for us to look at (please exclude all unnecessary code not required to reproduce the specific problem of displaying the dialog, and include all files necessary to build your dll with any
    specific instructions needed to do so).
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask

  • Can't close CVI panels in DLL-Detach when called from Teststand

    Hello,
    i've got a problem with Teststand calling a DLL produced with CVI.
    1. I use to DLL Attach and Detach calls to load or discard the panels. The attach part works fine, but when the TS sequence ends and i try to unload the module, the "DiscardPanel" function returns a error -129 "operation can only be performed in the thread it was created".
    If i call the same dll from a CVI executable, this doesn't happen.
    2. Additionally, the first time i run the sequence file the panel doesn't correctly quit and return to Teststand, so the whole thing hangs.
    Does anybody have an idea, what is going wrong?
    See attached files:
    ErrorOnDllDetach.seq --> Call DLL from TS
    \bin\usePanelsDll_dbg.exe --> Call DLL
    from CVI
    Attachments:
    NoUnloadOfDll.zip ‏326 KB

    Maik -
    After some more investigation, because of limitations in Microsoft's operating system, developers and CVI are limited in what they can do in DLLMain. Basically load and unload CVI panels in DLLMain just does not work well if the DLL is loaded and unloaded arbitrarily like it is in TestStand.
    One option is to never unload the panels and let CVI and the OS clean up the panels when the process terminates. You can do this by adding an extra reference to your DLL using LoadModule. You would basically prevent TestStand from unloading the DLL, so any dialog would stay around for as long as you like.
    The best way to have the dialog go away when TestStand is no longer using it is to associate your dial
    og lifetime with the execution that is displaying it. You load the panel either when the first call is made into the DLL or by an explicit call to a "Display" function exported from the DLL. Then have the dialog monitor for when the execution is terminated or stopped. This works because TestStand does not attempt to unload the DLL until the execution that is using it completes.
    I have attached an example DLL and sequence that does just this. It uses a default pool thread to display a panel and that thread waits for either an explicit call to a "Discard" function exported from the DLL or or if the execution stops.
    Hope this helps...
    Scott Richardson (NI)
    Scott Richardson
    National Instruments
    Attachments:
    DLLProject.zip ‏344 KB

  • Writed a dll for save string in teststand,get a error from teststand

    I'm writed a dll for save string in teststand, the dll can execute by itself well,but when loading by teststand, it always error heppen,I attached all resource here ,please kindly help me on this,thank you in advance.
    帖子被alexzheng在06-15-2006 03:19 AM时编辑过了
    Attachments:
    dll.zip ‏32 KB

    HI,
    I have resolved the problem, I have wrong define in the write function use : writetextfile(CString filename,CString text,int length)
    but the error happen when I transfer those string from teststand to dll,it generation a system level error and automatic close teststand software occur,
    after I change the define for :writetextfile(char *filename,char *text,int length) ,it is Ok now.
    帖子被alexzheng在06-15-2006 06:44 PM时编辑过了
    Attachments:
    err1.jpg ‏21 KB
    err1.jpg ‏21 KB

  • How deploy Dll's from TestStand

    Hi
    I have an appliction in which i have developed two DLL's.
    Now i want to use that Test Stand and Deploy the Two dll
    into some destination folder.
    How can i buid an installer  using the test stand
    Deploy option.
    Can any one Guide me
    Regards
    rags

    Rags,
    Are you familiar with the Deployment Utility?
    Are you using the Dll's as code modules?
    If you only want to distribute the Dll's follow the following steps:
    1. Create a workspace. (File->New Workspace File).
    2. Insert a new project into the workspace.
    3. Add the dll's to the project (Add Files).
    4. Save the workspace.
    5. Launch the deployment utility. (Tools->Deploy TestStand system)
    6. On the system source tab check the 'Deploy System from TestStand workspace file' box.
    7. Browse for the workspace you create in step 1.
    8. Go to the Distributed Files tab.
    9. You will get a prompt asking whether you want to analyze your source. Click on Yes.
    10. You can alternate between the view source and view destination option.
    11. Select one of your dll's and chage installation directory as desired.
    12. Go to the Installer options tab and change the default installation base directory as needed.
    13. Build the installer.
    To learn more about the deployment utility refer to chapter 14 of the Testand reference manual.
    Hope it helps. 
    Antonio Lie.

Maybe you are looking for

  • 802.1X and automatic vlan assignment

    Hello, I'm testing a 802.1X infrastructure : Switch : Try with Netgear Prosafe GS728TPS and Cisco SF300 Radius Server  : Microsoft NPS DHCP Relay for address assignement by Vlan I have created some policies with simple authentication for testing (MSC

  • Automatic import problem

    Can someone tell me what I may be doing wrong. When I place a CD in my CD player it boots it to iTunes, names the songs and checks the songs. Howeverl, to import the songs I have to import the songs individually from the CD. Is there any way that I c

  • Purchase of the same app twice accidently?

    I had attempted to purchase myExplorer app from the utilities section of the Ovi store. After pressing the buy button and confirming it to be payed through my phone bill it states an error with the transaction had occured and ovi store had acted as i

  • Where can I get a Calendar Bean?

    Dear experts, I plan to place a Calendar control in my application. Could anybody suggest me where can i get a one? Thanks in advance Unique

  • Problems opening iTunes after installation - "QuickTime was not Found"

    I am having trouble opening iTunes. Both iTunes and Quick time will download and install and I can open QuickTime without a problem, but when I open iTunes, I get the following error: Open iTunes and an error opens: "QuickTime was not found. QuickTim