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.

Similar Messages

  • Cannot run more than one instance of a remote app in remote desktop services Server 2012

    All,
    I installed "Remote Desktop Services (RDS) Quick Start Deployment for RemoteApp, Windows Server 2012 Style" using the instructions here http://blogs.technet.com/b/yungchou/archive/2013/02/07/remote-desktop-services-rds-quick-start-deployment-for-remoteapp-windows-server-2012-style.aspx
    I need to set up an image viewing program (Olyvia) to allow students using Macs and iPads access to this windows only application in order for them to get their work done.  We may have 12 or more students accessing and trying to run the Olyvia application
    at any one time.
    All works good, except that I cannot run the Olyvia application (setup as a remoteapp program) more than one instance at a time.  That is, when I start up "olyvia" on a Mac, it works great.  If I leave it up and running, and then try
    and start up "olyvia" on an iPad (using different accounts), I get the following error message:
    "Cannot run more than one instance of this program simultaneously.  Either the program is already running, or it has not been terminated completely."
    I need to understand the root issue.
    1.  Is this a licensing issue?  So, I need to add some CALs to the RDS server?
    2.  Is this a application issue with "olyvia"?  So, no matter what I do, it is not going to be able to be used by more than one person at a time when configured as a remoteapp?
    3.  Did I not "publish" the application correctly?
    4.  Is this happening because I followed the "quick start" guide?
    Appreciate any help I can get on this.  We have no problem getting CALs, I just need some help with the root issue.
    Thanks,
    Geoff Weatherford
    CVMBS, CSU

    Hi Geoff,
    Each application uses different techniques for determining if multiple instances are running.  If you can determine what method it is using then perhaps you could use App-V or other virtualization software.
    In the best case you really should direct your question to the maker of Olyvia.  The reason I said that is they specifically designed their software to prevent multiple instances, so the first question is, why?  Is it related to Licensing? 
    Compatibility?  If you knew the specific reason(s) why they are doing it and the technique used then at the point using a virtualization technique may be the best option.
    -TP

  • WebLogic Error : Registered more than one instance with the same objectName

    HI there, I'm facing a big problem. I have two environments installed on the same physical machine.
    I have ALSB and WLI servers running out there.
    Environment 1 - WLI port running at 7011 domain name : stp_wli_domain and ALSB port running at 8011 domain name: stp_alsb_homo1 - folders- stp_wli_domain / stp_bea_alsb_homo
    Environmnet 2 - WLI port running at 7211 domain name : stp_wli_domain2 and ALSB port tunning at 8211 domain name : stp-alsb_homo2 - folders - stp_wli_domain2 / stp_bea-alsb_homo2
    Everything was working fine, but these days I had install new deployments on both environment and I got this error :
    java.lang.IllegalArgumentException: Registered more than one instance with the same objectName : stp_wli_domain:ServerRuntime=wli_wls01,Name=stp_wli_domain,Location=wli_wls01,Type=AIRuntime new:com.bea.wlai.management.AIRuntimeMBeanImpl@bcf22dc existing com.bea.wlai.management.AIRuntimeMBeanImpl@de02e6c
    The weird is : There is no same object name, as you can see, domains are different, folders are different and ports are diferrent, including multicast addresses.
    Have you guys seen this before ?
    I'm under pressure here, 'cause some projects had stopped to work.
    Please I would appreciate any help.
    Tks.
    Edson

    HI there, thanks for attention..
    See ...
    There's a lot of confusion with these env's .
    I did not built this, so... I'm cleaning my hands.... anyway... :)
    I must fix....
    Well basically if we have two env's, so we have different project each one right ?
    Ok, but I was told that if you have on the same network and same physical machine the name of AdminServer as "AdminServer" in all domains, so it goes with problems... I never heard about it... but is a good practice you put the names for example :
    WLI - WLIAdminServer
    ALSB - AlsbAdminServer
    WLI2 - WLiadminServer2
    ALSB2 - ALsbAdminServer2
    I would do it.. this way..
    But how it wasn't me...
    We got..
    WLI - WliAdminServer
    ALsb - AdminServer
    WLI2 - AdminServer
    ALsb2 - AdminServer
    Have you got it ?
    So... I was told that this could be a problem, almost all AdminServers with the same name... guess what ?Some Projects are back to work. but not at all.. only some.. so I 'm breathing better now... but I would like to know if you seen this before ?
    I would appreciate your help again.
    Unfortunately there's no detailed stack trace to track this
    Tks.

  • More than one instance of same Declarative Component in a single JSF page

    Hi,
    I have problem in using more than one instance of same Declarative Component in a single JSF page.
    Only one instance is visible/rendered.
    If I drag and drop more than one instance of same Declarative Component in a single JSF page, only one is displayed.
    Not sure why is so....have I missed on some configuration?

    What version of JDeveloper are you using? What declarative component?
    In general when creating JSF UI components, care must be taken to avoid certain pitfalls that happen when one uses that component more than once in a page...so depending on which component you are using, one might surmise that more or less care was taken on that component when building it.
    If it was well tested though...like if it was an ADF Faces component, then that is probably not the problem.

  • Stop more than one instance of app from running

    hi,
    is there any way to stop more than one version of an application from running? i've seen topics on singelton but i'm not sure if that's what i need, i'm a little confused on that. what i need to do is stop the main app from running if it's already running, not some object within the app. something like being able to run only one instance of ms word. i was thinking about using a file, writing to it and deleting it when the app closes, so if the file exists the new instance will know something is running and not run, but the problem is if the app crashes because of windows, i won't be able to delete that file. any ideas?
    Thanks.

    1. The app should implement a special tiny server it tries to start on a specific range of private ports.
    The Well Known Ports are those from 0 through 1023.
    The Registered Ports are those from 1024 through 49151
    The Dynamic and/or Private Ports are those from 49152 through 65535
    - http://www.iana.org/assignments/port-numbers
    2. When the app starts, it tries to find a server already running on one of your defined ports, connect and listen for a special message you can choose: "app xyz by soni29 already running".
    If found, the application displays a message and terminates.
    Otherwise it starts the server and continues.

  • Can i create more than one instance for single database?

    HI
    anybody can tell me how to create more than one instance for single database(without using RAC)?
    thanks
    Kalanidhi

    Anandji,
    I sometimes think differently. I also think like what this person is asking..(although I have installed and administering 5 different RAC databases)
    The main doubt of mine is that we create multiple instances accessing the same storage area.
    Anyway the controlfiles of all instances will have the same information except the instance_names and instance id's.
    Hence I always think , why can't it be possible to to create another instance in the same system and point it to a controlfile which is copied from the other instance.
    Why can't the same files be shared between the two instances in a same system ?
    I know I am thinking a little bit confusing...
    Anyway I need to test that also...
    Mahesh.

  • Can I create more than one instance of a native library?

    Hello all,
    I am using Java to access a Win32 DLL with JNI. Everything is working fine, but I have several threads using the same instance of the native library because it is loaded "statically" in the Java class which uses it, and I suspect I am getting a bottle-neck at the native library.
    Does anyone know if there is any way to load more than one "instance" of a native library?
    The use of System.loadLibrary() would indicate not, and my (limited) knowledge of the Windows environment would tell me that a "shared" library only has on instance. (confirm anyone?)
    I need to find a way around this bottle-neck issue... (and "no", before anyone suggests it, I can't ditch Windows!)
    Thanks.

    I am not sure about the behaviour of the dll as it's not mine. It's a COM DLL which I have "wrapped" in a standard windows DLL so I can expose the JNI methods. I assume because it's COM that it IS reentrant, but I am a bit of a novice when it comes to Windows and COM. I didn't install the COMponent either, it was installed as part of another application. (It's an antivirus COM dll that is part of an AV application)
    Thanks for your help though, I think I will just have to live with it.

  • Can I open more than one instance of CC5.2?

    In my experience, I have not been able to find a way to open more than one instance of CC5.2.  If I want to run an SOD user analysis and an SOD role analysis, for example, I have to run one and wait for the results to return before I can run the next analysis.  
    If I open a new instance of Internet Explorer and type in the url for CC5.2 while CC5.2 is already running in a separate instance, it overwrites whatever is running and reopens CC5.2 all over again.
    In CC4.0 I was able to open multiple SAP sessions and run multiple SOD reports.  I understand 5.2 is a web app, but it seems the code should be smart enough to allow me to open multiple IE instances to run multiple analyses. 
    Am I missing something?
    Thanks,
    Sandy

    Hi Sandy,
      What about option to run your analysis jobs on the background ?
      You can still be in your IE session, but schedule several analysis to run on the background. On completion of the jobs, you'll be able to check output results for each of them.
      Advantage of this is that it also doesn't depend on your link between your machine and CC server which could be an issue for the foreground jobs.
    Best regards,
    Laziz

  • How to install more than one instances on one machine

    Hi ALL,
    I want to install more than one instances on one machine, but i am a freshman on SAP field. How and where can i get the related infomation for that? thank you very much !!

    Hi tieyan,
    Glad the information was of some help.
    For Windows, there is an older note <a href="http://service.sap.com/sap/support/notes/28392">28392</a> that has some more information. It is important also that the SAP parameter PHYS_MEMSIZE is sized correctly according to note <a href="http://service.sap.com/sap/support/notes/88416">88416</a> (the bottom of the note gives some examples). For example, if there were two central instances and the two Oracle database instances on one host, PHYS_MEMSIZE for both instance profiles (of the central instances) would be 35% of the RAM (1/2 of 70%). In the case of MSSQLSRV 2000, for PHYS_MEMSIZE you would refer to the scenarios of note <a href="http://service.sap.com/sap/support/notes/327494">327494</a>.
    If you ever want to thank somebody else for helping in answering a question, the <a href="https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement">Rules of Engagement</a> has a section 'Thank Others by Giving Points' that explains this further.
    Regards, Mark

  • Database with more than one instance

    hi,
    suppose if one database have more than one instance,if i want to shutdown one instance how can i do it? is it possible to shutdown any one particular instance? if so how?
    can any one tell me plz.........
    With Regards
    Boo

    Hi,
    More than one instance mounted on the same database ...means it is RAC
    On RAC, each instance will have a separate name.. check the individual init files.. you can find the instances names..
    connect to the database using that particular sid and issue shutdown.
    HTH
    Regards,
    Badri.

  • Can I launch more than one instance?

    Can I launch more than one instance of the same AIR
    application?

    Check out page 309 of the AIR Dev Guide "Only one instance of
    an AIR application is started. When an already running application
    is invoked again, AIR dispatches a new invoke event to the running
    instance. It is the responsibility of an AIR application to respond
    to an invoke event and take the appropriate action (such as opening
    a new document window)."
    It looks like we have to handle this InvokeEvent.INVOKE event
    and programatically create a new instance of the application.
    If anyone's done this already an example would be a big help
    as this will be a VERY common use case.

  • Running Air in More than One Instance of an Application

    Is there a work around to allow more than one instances of an Air Application to run?
    Currently our client uses dual monitors  they will spin up two applications.  One is to Inquiry data the other is to enter data.  I know I can create another project and deploy it under another name but that seems clunky.
    We are using  AIR  with Flex/Blaze/FlexMdi.
    Any information would be greatly appreciated.
    Thanks
    Steve

    Hi,
    I'm not too sure if the workaround proposed below will work or not. But it seems worth a shot:
    Create a new window when you get the invoke event. Find your desired screen's bounds by going through the static array Screen.screens. Assign that bounds to your newly created window.

  • Copy more than one clip at a time from iPhoto to iMovie?? Please help!

    Is it possible to copy more than one clip at a time from iPhoto to iMovie? I can't find a way to select/copy more than one.

    OK you can leave them in iPhoto and access them from the iMovie Event for iPhoto.
    If you prefer to move them to a regular iMovie Event, you can do the following.
    1) right-click on one of the iPhoto clips and select "Reveal in Finder". This will open a finder window showing the clips in the iPhoto Library.
    2) In a different Finder window, create a folder to hold your event in iMovie. If you are using an internal drive, create a folder using your desired Event Name under the Movies/iMovie Events Folder.
    Note: If you are using an external drive, create a Folder called iMovie Events at the top level of the external drive. Then create the (Event Name) folder under this. The external drive must be formatted as MacOS Extended (journaled) for this to work.
    3) Select all the clips in the iPhoto finder window that are part of this event and Move them to the Movies/iMovie Event/(Event Name) folder.
    4) After you have done this for all the Events, open iMovie and let it generate thumbnails. This may take a while.

  • TS3899 How do I delete more than one email at a time from my i phone 5C

    How do I delete more than one email at a time from my i phone 5C

    With your Mail app open and the listing of the messages, tap Edit at the top right.  Then check each circle on the left side of the messages to delete.  When you have checked those to delete, tap Trash at the lower right.
    Next tap Mailboxes upper left, under accounts select the account, then for the account tap Trash.  Select Edit upper right, and at the bottom, Delete All, and confirm Delete All and all will be removed at one time.

  • Deleting more than one file at a time from Nomad Jukebox Zen Xtra 4

    Is there a way to delete more than one file at a time from Zen Xtra? Actually, I'd like to delete most of the 800+ files and the only way I've found is to do them one at a time..! Help!

    Either use finder to drag and drop those tracks onto
    "Library" in iTunes' left "Source" column or from
    iTunes Menu Files use "Add to Library ..." then
    navigate to a folder that keep a yoru tracks and
    select that folder.
    This did it! I was doing an "import" which would only let me do one song at a time. But the "add to library" and the drag and drop both worked. Thanks!!!
    New Mac user
    Scott in Alaska
    MacBookPro   Mac OS X (10.4.5)  

Maybe you are looking for

  • Vendor invoices report

    Report required on  vendor invoices  which includes number of invoices/ credit memos for particular period and value paid to vendor by selecting posting dates in both MM and FI point of view.It is very urgent. I would appreciate if you could give any

  • My phone is not working. It turns on by itself and doesn't accept my commands

    Out of the blue it stays on by itself and doesn't take anny of the commands like off or the screen touches. Help please! This is a 6-month old phone and I treat it very well.

  • Transferring pc to macbook pro

    I need help transferring all my photos and information from my hp pc onto my new macbook pro please.

  • How much does it cost to replace the speakers in MacBook Pro (mid 2010)?

    The sound from my MacBook Pro (mid 2010)  has suddenly become fuzzy. I suspect that I blew a speaker. Does anyone know how much it would cost to have one or all the speakers replaced?

  • Need Help with Treat Function

    Im currently studying Oracle and SQL im really stuck on this. if anyone could give me a hand it would be much appreciated. drop table Property_tab force; drop table Appointment_tab force; drop table Person_tab force; drop type view_list_type force; d