Data Socket fails if built in DLL and called by Labview

I've placed a Data Socket Connection Open in a SubVi and tested this by running the VI. -> No Problems.
Then i've compiled a DLL from this Vi and started it from Visual C. -> No problems
Now, i've included this DLL in another VI and started this.  Now i receive an Error.
All Information is hardcoded in the DLL so there are no possiblities with parametrization.
Does anyone have an Idea regarding this?
Best regards
Hacky

Hello Carsten_S.....
my collegue, who found this behaviour made a little package to
show the environment. Since he uses a camera system there is no
possibility to get it running. But it should be easy to create a LV based
server.
Our Environment is:
LV 7.1
Windows XPSR2
Regards, Hacky
Attachments:
DLL.zip ‏76 KB

Similar Messages

  • When trying to upload a document or attach a document in an email Firefox gives me an error "Failed to load CTDFMRES.dll" and stops responding, I have no issues in any other browsers. And I am using Firefox 4, Fixes???

    When trying to upload a document or attach a document in an email Firefox gives me an error "Failed to load CTDFMRES.dll" and stops responding, I have no issues in any other browsers. And I am using Firefox 4, Fixes???

    You don't have to disable any addons or extentions!!!You guys are not going to believe this I figured out the problem it's really dumb...ok here goes the attachment uploader loads seperate so I got to thinking it's a popup so I went to options content and under block pop ups there is an option exceptions click on that and in the box type firefox.com and hit allow pow its fixed!!!!! :-)

  • IS IT POSSIBLE TO CONVERT DATA SERVER EXAMPLE INTO DLL AND CALLING IT FROM VC++

    Hi;
    I have a real time implementation that runs in my PXI machine. Then I have a front panel running on a different computer (host) that reads the outputs of the real-time machine and plots them. The output of the real-time machine is a 2d array. What I am trying to do is take this data and send it to my C++ application. To do that I am considering sending the data to a specific port on my host machine using the data server example (2d version of it). To this end, I am considering converting this server into a Labview dll and read its output in my C++ code.
    I am wondering if this can be done?  
    If yes Could you please provide me a little code as to how to read the outputs of this Labview dll in c++?    
    Is there any tutorial as to how to create a Labview dll for Labview 2009? 
    Thank you so much!
    Serdar 

    Hello,
    You may want to take a look at this tutorial:
    http://zone.ni.com/devzone/cda/tut/p/id/3517
    Let me know if it helps!
    -Zach
    Certified LabVIEW Developer

  • Creating dll and calling it in labview crashing the program

    Hi All,
    I am using labview from quite a long time.But this time i am stuck with dll.Not able to solve this issue.
    I have to communicate with FTDI chip.
    I have a VC++ Project to communicate with SPI of FTDI.That Code is working perfectly fine.
    Now I Have to automate that through LabVIEW. VISA Drivers i cant use in this. So Last option left is either to create dll or to make EXE out of it.
    I have tried by creating DLL and then calling it in LabVIEW by using Call Library Function Node.But its not helping me out every time LabVIEW is getting Crashed.
    Is there error in creation of dll or something i am not doing properly while calling?
    Thanks In Advance 
    Shweta
    Attachments:
    old_dolphin_sub_spi_func_ftdi.c ‏21 KB
    ftdi_write_read.vi ‏15 KB

    Which function call crashes LabVIEW?
    Have you tried switching the calling convention from stdcall to C for all of the DLL calls?
    Why are you converting a string to a number, instead of using a numeric constant directly? If you want a number in hex, you can right-click a numeric constant, make the radix visible, and switch it to hex display.

  • The application failed to start (msvcp100.dll and atl100.dll not found)

    I recently have been getting this error upon opening up LabView 2012. I get two seperate error messages. The first says "The application failed to start because MSVCP100.DLL was not found. Re-installing this application may fix the problem." The other message says the same thing but it is ATL100.DLL that is not found.
    I think these files are part of the C runtime engine, but I don't know what I need to install to fix this issue.
    Solved!
    Go to Solution.

    Hello boochbrain, 
    I believe you are correct that these files are part of a runtime engine; specifically, the C++ runtime library.  Reinstalling these libraries could definitely alleviate these errors you are seeing.
    Here is a link to free download pages for various versions of this software on Microsoft's website:  http://www.microsoft.com/en-us/download/search.aspx?q=visual+c%2b%2b
    Let me know how it works out!
    Kevin W.
    Applications Engineer
    National Instruments

  • Can not find size_t during import a dll and calling a function crash labview

    Hello, experts
    I need to use FingerLakeInstrument  DLL ( see the attached) inside Labview to talk to a CCD camera. it is built from microsoft visual studio C++
    I unzip FLI dll in my D:\proj\...\linfli-32 and import dll from there. created a c:\FLIDBG.txt as FLI dll needs to write debug message to it if FLISetDebugLevel() or others are called.
    During importing the dll, first thing I got is <sys/types.h>  ( ie size_t ) cannot be found. I have installed free version of microsoft visual studio C++
    but can not find "typedef unsigned int size_t"
    at the end, I just added
     typedef unsigned int size_t;
    in the libfli.h. Having done that, I am able to import all functions into Labview and have a user library called libfli.
    However, as soon as I start calling a simple function in a test.vi, such as FLIGetLibVersion(char* ver, size_t len), which involves nothing other than the library, the labview will crash.
    I created a simple C test.exe which calls many functions without any problem
    any suggstion?
    regards
    xiaofeng
    Solved!
    Go to Solution.
    Attachments:
    libfli-32.zip ‏93 KB

    Hi, Smercurio_fc
    thanks for your reply. Yes, you are pointing to the right place.  I have solved the crash problem.
    when importing DLL into Labview using Tools\import\Shared Library (.dll), Labview automatically set the calling convention as C not as stdcall (WINAPI).  it is this that later the labview crashes when a function is called.  as soon as I manually re-selecte calling convention as stdcall, my test.vi works OK (see attached).
    I tried Call Library Function too to call libfli.dll, as long as I select stdcall as call convetion. the test.vi works.
    How do I know which Call convention I need to choose if  there is no infomation from DLL provider?
    as for the size_t,
    I add   #include <crtdefs.h> in libfli.h and 
     add additional include path as
    C:\Program Files\Microsoft Visual Studio 10.0\VC\include.  this  solved the "not found" issue.
    for this case I know that the DLL is built from VC++,  is this right way? 
    again, thanks for your time.
    xiaofeng
    Attachments:
    test.vi ‏13 KB

  • Couldn't Load DLL and Call JNI in Portal Servlet !!!

    Hello,
    I'm trying to write a small test servlet in portal which will call functions in a DLL using JNI. Here is my source code. I put my DLL in \Window\system32, usr/sap/J2E/JC01/j2ee/os_libs, even included into my portal project \PORTAL-INF\lib. But everytime when I try to preview my page, I got the following error and I couldn't find the log file specified in the error message. Please help me out. Thanks a lot!
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    MyTestDLL.
    Exception id: 12:25_23/12/06_0029_11241950
    See the details for the exception ID in the log file
    Source Code:
    import com.sapportals.portal.prt.component.*;
    public class CIViewTest extends AbstractPortalComponent
         public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
              response.write("Hello From Java Servlet!!!\n");
         static {
              try {
                   Runtime.getRuntime().loadLibrary("MyTestDLL");
    // I've also tried System.LoadLibrary("MyTestDLL");
              } catch (UnsatisfiedLinkError ule) {
                   throw ule;

    Nobody used JNI in Portal Servlet??? Please advice. Thanks!

  • End date the use of a certain subtemplate and call another in its place

    Hi All,
    How can we refer to multiple subtemplates so as to end date the use of certain subtemplate say on Dec 31 2007 and start referring to another subtemplate in its place from Jan 1 2008??
    Any pointers to the same will be extremely helpful.
    Thanks in advance.

    This work, but its hardcoded and not really flexible. You can also change the date format to compare whatever you want I guess. Hope it can help!
    <?import:file:///C:/sub_2007.rtf?>
    <?import:file:///C:/sub_2008.rtf?>
    <xsl:if test="xdoxslt:sysdate('YYYY')='2007'"><?call-template:sub_2007?></xsl:if>
    <xsl:if test="xdoxslt:sysdate('YYYY')='2008'"><?call-template:sub_2008?></xsl:if>

  • Failed to load WMSchApi.dll. Error 1114 All Operation disabled

    We currently have a large number or workstations that have imported fine, we
    can view diag info but are unable to use any remote control functionality.
    Below is an extract from the zen remote log file which shows a failed load
    off wmschapi.dll and a critical error .
    Anybody got a fix that can be automated
    Thanks
    Scott
    We're using the ZFD agent from IR4 patch which is working fine on other PCs,
    all 49 SP2 clients, W2K SP4.
    #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    Files\Novell\ZENworks\ZenLite.dll
    #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    Files\Novell\ZENworks\ZenPol32.dll
    #(660)# 16:59:50 11/24/04 Normal : ZENNDSUtil: Successfully loaded
    dependent modules...
    #(660)# 16:59:50 11/24/04 Normal : LoadZenAutilLibraryAndGetProc:
    Successfully loaded ZenAutil.dll and its dependent DLLs
    #(660)# 16:59:50 11/24/04 Normal : Console version is SP1
    #(660)# 16:59:50 11/24/04 Critical : ZenRmServer: Failed to find
    Console Version #0.6.5.1 in supportability list
    #(660)# 16:59:50 11/24/04 Warning :
    RMAudit::Auditing.cpp:RMSesstionStart() The audit log file is not found.
    #(660)# 16:59:50 11/24/04 Normal : ZENUtil:
    ZENIsWorkstationRegistered: wsDN 'CN#(660)# 16:59:50 11/24/04 Normal :
    Workstation is registered
    #(660)# 16:59:50 11/24/04 Normal : ZENNDSUtil: Attempting to read
    policies...
    #(660)# 16:59:50 11/24/04 Normal : ZENUtil:
    ZENIsWorkstationRegistered: wsDN 'CN#(660)# 16:59:50 11/24/04 Normal :
    Workstation is registered
    #(660)# 16:59:50 11/24/04 Normal : Reading workstation DN and tree
    name...
    #(660)# 16:59:50 11/24/04 Normal : workstation DN -
    CN
    #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    Files\Novell\ZENworks\WMSchApi.dll
    #(660)# 16:59:50 11/24/04 Critical : ZENNDSUtil: Failed to load
    WMSchApi.dll. Error: 1114
    #(660)# 16:59:50 11/24/04 Normal : Reading workstation DN and tree
    name...
    #(660)# 16:59:50 11/24/04 Normal : workstation DN -
    CN
    #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    Files\Novell\ZENworks\WMSchApi.dll
    #(660)# 16:59:50 11/24/04 Critical : ZENNDSUtil: Failed to load
    WMSchApi.dll. Error: 1114
    #(660)# 16:59:50 11/24/04 Normal : Neither policy settings active.
    All operations disabled.

    > We currently have a large number or workstations that have imported fine, we
    > can view diag info but are unable to use any remote control functionality.
    >
    > Below is an extract from the zen remote log file which shows a failed load
    > off wmschapi.dll and a critical error .
    >
    > Anybody got a fix that can be automated
    >
    > Thanks
    >
    > Scott
    >
    > We're using the ZFD agent from IR4 patch which is working fine on other PCs,
    > all 49 SP2 clients, W2K SP4.
    >
    >
    > #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    > Files\Novell\ZENworks\ZenLite.dll
    > #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    > Files\Novell\ZENworks\ZenPol32.dll
    > #(660)# 16:59:50 11/24/04 Normal : ZENNDSUtil: Successfully loaded
    > dependent modules...
    > #(660)# 16:59:50 11/24/04 Normal : LoadZenAutilLibraryAndGetProc:
    > Successfully loaded ZenAutil.dll and its dependent DLLs
    > #(660)# 16:59:50 11/24/04 Normal : Console version is SP1
    > #(660)# 16:59:50 11/24/04 Critical : ZenRmServer: Failed to find
    > Console Version #0.6.5.1 in supportability list
    > #(660)# 16:59:50 11/24/04 Warning :
    > RMAudit::Auditing.cpp:RMSesstionStart() The audit log file is not found.
    > #(660)# 16:59:50 11/24/04 Normal : ZENUtil:
    > ZENIsWorkstationRegistered: wsDN 'CN#(660)# 16:59:50 11/24/04 Normal :
    > Workstation is registered
    > #(660)# 16:59:50 11/24/04 Normal : ZENNDSUtil: Attempting to read
    > policies...
    > #(660)# 16:59:50 11/24/04 Normal : ZENUtil:
    > ZENIsWorkstationRegistered: wsDN 'CN#(660)# 16:59:50 11/24/04 Normal :
    > Workstation is registered
    > #(660)# 16:59:50 11/24/04 Normal : Reading workstation DN and tree
    > name...
    > #(660)# 16:59:50 11/24/04 Normal : workstation DN -
    > CN
    > #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    > Files\Novell\ZENworks\WMSchApi.dll
    > #(660)# 16:59:50 11/24/04 Critical : ZENNDSUtil: Failed to load
    > WMSchApi.dll. Error: 1114
    > #(660)# 16:59:50 11/24/04 Normal : Reading workstation DN and tree
    > name...
    > #(660)# 16:59:50 11/24/04 Normal : workstation DN -
    > CN
    > #(660)# 16:59:50 11/24/04 Normal : Loading : C:\Program
    > Files\Novell\ZENworks\WMSchApi.dll
    > #(660)# 16:59:50 11/24/04 Critical : ZENNDSUtil: Failed to load
    > WMSchApi.dll. Error: 1114
    > #(660)# 16:59:50 11/24/04 Normal : Neither policy settings active.
    > All operations disabled.
    >
    >
    Just to support the previous person who also replied to this question. We
    had the same problem and it was the path. Someone pushed an app that
    replaced the path instead of appending to it and it killed the zen remote
    agent. Replacing the path to "c:\program files\novell\zenworks" path worked.
    Thanks much for the person who first suggested this.
    Neal...

  • TCP/IP Sockets Comunication by user defined DLL Class

    i will describe it briefly. i need to create a dll class to establish a socket communication and that dll class i should use it between the client App and the server App. but the main task is not done yet which is how to enforce editing to the display
    controls in both Apps by the Class functions. that is it. any help will be appreciated.

    "what i missing here is how to enforce any control on the server App to display the received messages once the client thread send it"
    You cannot enforce this simply by creating a class and/or putting it into a library.  Your MySocket class could generate an event when a message is received but you cannot force client code to do anything about it.  It
    is responsibility of the server code to handle the message and react accordingly.
    "I know i have to specify by coding a specific function on the server side to override another function in the created socket class and that what i'm trying to do."
    Client and server have nothing to do with each other in this case.  Your server side code isn't going to be able to do anything on the client side.  That is the whole reason you're using a client-server architecture.  You can create a client
    class that receives pre-defined messages from the server and handles them.  You can also make these methods virtual so that clients can derive from your client class and do something different for the messages it cares about. 
    //Code on server side
    public class MyServer
    public void SendMessage ( string message )
    //Send message via socket
    //Code in client side type that can be re-used by any client
    public class MyClient
    protected virtual void OnMessageReceived ( string message )
    //Do something with the message
    private void HandleMessagesFromServer ()
    //Infrastructure to monitor socket for messages,
    //determine "message" received and call appropriate
    //method for processing
    //Ex: If server sent a message containing a single string
    OnMessageReceived(stringFromServer);
    //A client may override the behavior for the message(s)
    public class MyCustomClient : MyClient
    protected override void OnMessageReceived ( string message )
    base.OnMessageReceived(message);
    //Notify my UI of the message
    Alternatively you could define a series of events that are raised when messages are received. 
    //Server code doesn't really change
    //Client code uses events instead of virtual methods
    public class MyClient
    public event EventHandler<MessageReceivedEventArgs> MessageReceived;
    private void ProcessMessagesFromServer ()
    //Responsible for watching the socket for messages,
    //translating the messages from the socket and
    //raising the event(s)
    //i.e. Raising an event
    if (MessageReceived != null)
    MessageReceived(this, new MessageReceivedEventArgs(stringFromServer));
    //Clients can handle events instead
    public class SomeUIElement
    //Some initialize method
    private void Initialize ( MyClient client )
    client.MessageReceived += OnMessageReceived;
    private void OnMessageReceived ( object sender, MessageReceivedEventArgs e )
    //Do something with message like display it
    //Note: This is probably not running on UI thread
    Either approach allows a client to react to notifications from the server.  However on the server side all you really need to do is send the appropriate message via the socket.  The client is responsible for reacting to that message in whatever
    way is most appropriate. 
    Michael Taylor
    http://blogs.msmvps.com/p3net

  • I get error 998 when calling a LabVIEW buildt DLL from MSVC++

    I created a DLL in LV 6.0.2. This DLL contains 39 VIs and controls. 13 of the VIs are exported, the others are subVIs, which one of them is a dynamic VI.
    I do not have all connectors used by defining the VI prototype in the build file for the application builder.
    Using this DLL I get four effects:
    From LV 6.0.2 FDS all works fine until I quit LV immediatly after the application VI stoppes. Then LV wants to save some of the VIs of the DLL.
    If I do the same but close the VI before I quit LV one want save anything.
    After Building an exe from the application VI and running the exe all works fine. The VI will only stop and if I close or quit noone wants to save something.
    Then I built an application with M
    SVC++ 6.0 using this DLL. There will be no errors or warnings during the build. If I start the application i get an error message dialog with the number 998 stating "system error loading LV Runtime engine. My application needs a Version 6.0 or compatible Runtime-engine". The path to teh Runtime-engine is given in the dialog and the lvrt.dll there has version 6.0.2.
    Does someone run on such a problem?
    Has someone a solution to this?
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

    Waldemar,
    I. LabVIEW wanting to save VIs
    The DLL created is just a group of VIs, not actually compiled DLL code. When the subVIs are called, they might be cached from the disk copy, not the one in the DLL. LabVIEW then loads the separate copy of that subVI. It will then ask if you want to save changes because there were value changes when it was run (this makes since) or it is in LabVIEW 6.0 version and has not been mass compiled for LabVIEW 6.0.2. When it is compiled to an exe, the search path for the subVIs goes through the executable and not the LabVIEW development environment. Also, saving VIs is not an option in an executable so the save dialog does not pop up.
    II. MSVC++ error
    This is actually a Microsoft issue. It has something to do with static and
    dynamic linking of the MFC DLL. Our R&D engineers have verified this with projects created with no LabVIEW code at all (that is why we believe it to be solely a Microsoft issue). There are three options at this time:
    1. Link with the DLL form of MFC.
    2. Do not link with the .lib from the LV DLL, instead use LoadLibrary and GetProcAddress to dynamically load the DLL and call the function.
    3. Use the VC delayload feature to make the LV DLL not get loaded until the first call is made into it. See VC help on "delayload" for information on setting this up.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • If only using wifi, will I still receive text messages and calls from non iPhone users?

    If only using wifi (turning off Cellular Data) will I still receive text messages and calls from non iPhone users?

    If you have cell service with a text plan, yes.

  • Calling primary dll which calls secondary dll

    Hi all
    I have a visual C++ file which calls a dll named mpusbapi.dll . The visual C++ file has some additional
    functions also. I want to make this visual C++ file itself a dll and then call this dll from call library function
    in labview. Please guide me in making this visual C++ file dll. 
    To make functions visible in call library function what do i use.
    _declspec (dllexport)  or  Extern C
    I have also read the tutorial of making Writing a DLL with Microsoft Visual C++
    Are there any steps required in doing this? Please tell
    Regards

    I want to add one more thing that in the tutorial of Writing Win32 Dynamic Link Libraries (DLLs) and Calling Them from LabVIEW
    What is this for
    BOOL WINAPI  DllMain (
                HANDLE    hModule,
                DWORD     dwFunction,
                LPVOID    lpNot)
        return TRUE;
    Is it necessary to write this in order to create our own dll?

  • Can a VI compiled in dll be called in LV?

    Hello,
    I have some dll´s, which use some common VIs. This means, each time when I compile a dll, the VI will be compiled within the dll. What habbens, if I compile the same VI in another dll, and call the dlls in the same time. Will be there a collision, that the VI is already loaded , by calling the second dll?
    regards
    Mitulatbati

    Maybe I did not understand the question correctly...
    If you have a vi that is compiled into a dll and then from another vi (main) you call both the original VI and the dll, it should not collide as you would be calling different objects.
    Have you tried it and having problems?

  • LvStorage.dll and Built application

    Am running LV 8.0.1, and am created a TDM output file with some measurement results, then sending it to DIAdem using the LV-DIAdem Connectivity VIs.  I built the application and created an installer.  The install goes fine, but when I try to launch the .exe, the the application searches for "lvStorage.dll", which is an NI dll.  I have verified that the .dll is in the data folder that is created by the installer.
    Any thoughts?  My workaround at this point is to install a second copy of the DLL in the Windows directory, which is not the best solution, but seems to get the job done.
    Joe
    Joe Gerhardstein
    Averna Test Systems
    Certified LabVIEW Architect
    http://www.averna.com

    I have the same problem with exe's.  The two choices I use are to store a copy of the dll into the same directory as the exe and to store a copy in the Windows\System32 directory.  Not very elegent since I don't like having copies of a dll in more than one place, but it works fine.  One thing I haven't tried yet is to changed the search path in labview so that the original path of the dll is amongst the search list.  But I don't think search paths carry over to exe's.  I wish the dll could be merged into the exe altogether.
    The whole idea of the dll needs to be scrapped.  It was invented with the intention that the dll code could be reused to save hard drive space.  But it seems that every program has its own dll, and now there are millions of dll's all over the place.  I would rather the dll code just be imbedded into the exe.
    - tbob
    Inventor of the WORM Global

Maybe you are looking for

  • Transferring pictures from Nokia phone to PC

    Hello - I'd like to transfer pictures currentyly stored on my Nokia 6300 to my computer. Is there a way I can email them? I don't appear to find any options to do this on my phone and would very much appreciate anyone's thoughts and expertise. Many t

  • Upgrade to ECC6

    hi all our client s plannin to upgrade for the verion of ECC6 can anyone help me n understanding , n wat way the ABAP techniques differ in the new upgradion of ECC6 s there any major difference and also please can u tell me n wat way the environment

  • Broken Download link for JDeveloper Preview 3

    http://otn.oracle.com/software/products/jdev/htdocs/soft903.html?src=855007&Act=101 This link has been broken every day since Jdeveloper 3 Preview has been announced. Any chance someone can fix this. I've put in several trouble tickets to get a fix.

  • How to compare two records of table

    Hi all, How to compare new record with all existing records in table. In my application i have status column ,which contains the information about the record is new or old record . thank you

  • Locating sqlite .db file

    Hi, I have created a database using the code var dbFile:File = File.applicationStorageDirectory.resolvePath("sheduler.db");             sqlc.openAsync(dbFile);             sqlc.addEventListener(SQLEvent.OPEN, dbFile_opened );             sqlc.addEven