Call Library Function Node produces error in Windows 7

Hi,
      I've created a simple program using LabVIEW 8.5 that uses calls in winscard.dll to read and write to a Smart Card.  I use Call Library Function Node to call functions in C:\Windows\System32\winscard.dll.  This program works without a problem in Windows XP both within LabVIEW 8.5 and once it is compiled.  I am also able to get this program to run without a problem when I run it in LabVIEW 2011 on a Windows 7 machine.  However, when I run the program compiled with LabVIEW 8.5 on Windows 7, the first call I make to a function in the DLL returns Windows System Error 2 (file not found).  Subsequent calls to other DLL functions return errors about invalid handles, which makes sense. 
Can I compile the project in LabVIEW 2011 and save it back to a LabVIEW 8.5 compatible project file?
Thanks,
Jason Mazzotta

Bannu wrote:
Hi All,
I am also having the similar issue. I have a VI, developed in LV2010 on Windows XP machine with a dll call using "Call Library Function Node".
It is working fine in all WindowsXP machines but not in Window7 PCs.
Getting Error when i tried to open in Windows7 machine:
Error loading "DLL path....". Invalid access to memory location.
Please let me know how to make this working on both machines [XP and Win7].
Thanks,
Soumya
Way to little information to say anything useful about it. Attach your VI, explain what it should do, explain what the DLL is you try to call! You don't call your mechanicien saying your car doesn't start and expect him to diagnose the problem over the phone either with that much information.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • DIO Port Config & DIO Port Write Block Diagram Errors (Call Library Function Node:libra​ry not found or failed to load)

    Hi Guys, need help on this.
    I have this LabVIEW program that used to work on the old computer.
    The old computer crashes most of the time, so I upgraded the computer
    and used its Hard Drive as slave to the new computer.
    I have no idea where are its installers since the guy that made the program 
    is not in my department anymore.
    I downloaded all the drivers needed from NI: NIDAQ9.0, NIVISA,NI488.2, 
    and drivers of some instruments needed in the setup. I'm using LabVIEW8.2.
    Everything's fine until I open the LabVIEW program for our testing.
    Here goes the error:
       DIO Port Config
       DIO Port Write
    Block Diagram Errors
       Call Library Function Node: library not found or failed to load
    Attachments:
    ErrorList.JPG ‏200 KB

    Honestly, I'm a newbie on Labview. I just want this old program to run on the new computer.
    The guys that installed the drivers on the old computer are no longer here in my department.
    And I have no idea where the drivers are. So I just downloaded the drivers needed for my hardware and instruments.
    Here's my hardware: (cards: PCI-DIO-96, PCI-GPIB), (instruments: SCB100,E4407B, HP83623, HP3458, HP8657)
    OS: Windows XP Pro
    By the way, I have unzipped the TraditionalDAQ drivers. First I tried the 7.4.1, but installation error appeared.
    I thought maybe the installer is corrupted, so I downloaded the 7.4.4 and unzipped it.
    But, still same installation error appears. I don't understand, both TraditionalDAQ drivers have same installation error.
    Now I have tried the DAQmx8.7.2 driver, bu still the DIO Port Config and DIO Port Write have errors.

  • Call Library Function Node 'Wrapper.C​reate': Library not found or failed to load. using windows 7 64 bits

    Dear all
    I try to interface my spectrometer (NIRquest from ocean optics) using labview on my 64 bits cumputer using windows 7.
    I have absolutely no problem to run the spectrometer with the program dedicated to the spectrometer (called Spetrasuite).
    I've installed "OmniDriverSPAM-1.66-win64-development-installer.e​xe" and everything went right.
    When I select a VI in LabView (e.g."wrapper_create.vi") from the wrapper.llb, LabView returns an error :
    "Call Library Function Node 'Wrapper.Create': Library not found or failed to load."
    I chek the call library function, but everyting seems to be right :
    I use LabView 8.6.1 and my others *.vi are running perfectly...
    Do you have any idea from where does the problem comes ?
    Thank you very much

    Hello Flanguy,
    In addition to smercurio_fc's feedback I can confirm that LabVIEW 8.6.1 doesn't exist in 64-bit version.
    Officially, LabVIEW 8.6.1 doesn't support Windows 7 either.
    The minimal version of LabVIEW you would need to both support Windows 7 and exist in 64-bit version is LabVIEW 2009 64-bit or any 64-bit versions which are more recent.
    In the two links (1 & 2) you can find more background information.
    Kind Regards,
    Wouter
    National Instruments Belgium

  • Window doesn't close wheh Call Library Function Node set to Run in Any Thread

    This is a problem regarding Call Library Function Nodes running in the UI thread or any thread.
    I have a camera which has its own API supplied as a dll. I have created a set of VI wrappers which each call a function in the dll through a Call Library Function Node.
    Initially each CLFN was set to 'Run in the UI thread' (the default).
    To start the camera streaming images I call (through a CLFN)
    ICubeSDK_Start(int CamIndex, Hwnd, ImgHandle, bool Preview, bool callback);
    If Preview = True then the image is displayed in a preview window.
    If ImgHandle = NULL a default preview window
    is used.
    In the CLFN definition I define:
    ImgHandle as a U32
    Preview as a I32
    To stop the camera streaming images I call
        ICubeSDK_Stop(int CamIndex)
    In the actual implementation I set ImgHandle = 0 (NULL) and Preview = 1 (true).
    This all works fine, and a preview window is opened and images displayed. When I call ICubeSDK_Stop the preview window is closed.
    However, I would prefer to set the CLFN to 'Run in any thread' because
    a) when run in the UI thread the preview window randomly gets sent to the back when I switch focus between open VI windows (presumably because it is in the same thread as the VIs)
    b) I don't want to put unnecessary stuff in the UI thread
    c) my (naive?) understanding is that it is safer to run in any thread
    So I have set all CLFNs to 'Run in any thread'
    When I do this the preview window opens OK, and behaves like any other non LabVIEW controlled window in terms of focus. But when I call ICubeSDK_Stop() the preview window does not get closed properly, it just shows a blank image. I can't close it manually, there is no X in the corner and no option to close it from the taskbar. To get rid of it I have to close the LabVIEW project it is spawned from, which often results in a crash. It does appear as a separate item in task manager but if I 'end process' it, LabVIEW closes (and often crashes) as well.
    If I change only the CLFNs that call the Start and Stop functions back to 'Run in the UI thread' then it all works fine again, except that the preview window gets sent to the back randomly as before.
    So, what do I have to do to get the preview window to close properly if I set the CLFN to 'Run in any thread'.
    Alternatively, is there a way to close the window programmatically (ie force it to close) after I have called ICube_Stop.
    Thanks
    DAve

    Hi Dave,
    The "Run In UI Thread"  switches from the thread the VIs currently executing in to the user interface thread. If you select "Run in Any Thread", the Call Library Function Node continues in the currently executing thread. By default, all Call Library Function Nodes run in the User Interface thread.
    Before you configure the Call Library Function Node to run in any thread, you have to make sure that the code is thread safe. Code is thread safe when it does not store any global data (e.g. global variables, files on disks, etc.), does not access any hardware, does not make calls to any functions, libraries or drivers that are not thread safe.
    Unfortunately, since you said that your DLL accesses hardware, it is not recommended to use "Run in Any Thread." This is probably why you are seeing the crash.
    If your preview window gets sent to the back you can programmatically bring it forward. Here is an example of how this can be done: http://decibel.ni.com/content/docs/DOC-4551
    If you want to completely close the window down you can do so as described in this link: http://digital.ni.com/public.nsf/allkb/81E9C144190​0FFCE8625748F0055DBB0?OpenDocument
    I also thought you might find this useful: http://zone.ni.com/devzone/cda/tut/p/id/3009
    I hope this helps.
    Regards,
    Mahdieh G
    Applications Engineer
    National Instruments UK&Ireland

  • LabVIEW PDA reports COREDLL.DLL error when using Call Library Function Node

    I'm trying to build a LV PDA app that calls an external DLL file built using embedded visual C. When configuring the Call Library Function node I select the stub DLL, configure the I/O parameters and select OK. When the configuration dialog closes I get the following error:
    LabVIEW: LabVIEW.exe - Unable to Locate Component
    This application has failed to start because COREDLL.DLL was not found. Re-installing the application may fix this problem.
    I do not get this error when using the configuration dialog in the example VIs.
    Any suggestions as to the cause and/or the solution?
    Thanks,
    Ryan

    Hello -
    When you create a PDA VI that calls a DLL, you must include the .c or .lib file that corresponds to the DLL. Take a look at these documents:
    LabVIEW PDA Module Build Errors with VIs that Call DLLs
    Why Do I Receive Errors When Calling a C++ DLL from a Call Library Node Using the LabVIEW PDA Module...
    How To Call External Code in LabVIEW PDA for Palm OS
    H
    ow To Call External Code in LabVIEW PDA for Pocket PC
    Hope this helps!
    S Vences
    Applications Engineer
    National Instruments

  • Executable created in LabVIEW 7.1 containing Call Library Function Node runs but creates error when Call Library Function Node is executed

    I have created a simplee application that controls a piece of equipment with all control via a supplied dll.  Hence, there are a number of Call Library Function Nodes within the code and a modicum of other LabVIEW code.  Everything works fine as a LabVIEW application, but when converted to an executable, although the application runs and functions, as soon as any Call Library Function Node is executed, calling from the dll, I get the C++ debug error in the attachment.
    Is this something that I can solve from within LabVIEW, or is the problem likely buried in the dll?
    Damian
    Attachments:
    CLFN error.JPG ‏22 KB

    Hi Wise,
    Try building an executable from a very simple VI that makes one call to the dll. Have you also try using the Call Library Function node on other simple dlls that you know will work?
    Regards,
    Stanley Hu
    National Instruments
    Applications Engineering
    http://www.ni.com/support

  • Call Library Function Node

    When using a call library function node and program is exited, I get a "has encountered a problem and needs to close" error having to do with ntdll.  It doesn't stop the program from running correctly, but it is annoying.  Any ideas?
    Solved!
    Go to Solution.

    Sorry about the missing information.  This is my first post.  I am using Labview 2010 on Windows XP SP3.  I am including a stripped down version of my application that will produce the same error along with the project file.  This only happens when the application is built into an executable.  It will also occur if the application is closed before FindWindowA is called.  I'm also including a file containing the error that comes up.  I appreciate all the help.
    As to why I'm doing this myself?  Ignorance would be the best explanation.  A machine supplier gave me a VB program to communicate with his application.  I used the same functions in Labview to do the communication and it worked great.  I thought that was pretty cool. 
    Attachments:
    FindWindowA Test.vi ‏25 KB
    FindWindowA Test.lvproj ‏7 KB
    FindWindowA Error.JPG ‏28 KB

  • Execution time for Call Library Function Node

    I am experimenting with the Call Library Function Node block in LabVIEW and am curious if it should be running faster than what I'm seeing.  For testing purposes, I have compiled and transfered to my RT target the .out file from the KB article http://digital.ni.com/public.nsf/allkb/81D1172E3C28A5E4862575CC0076A230 (I'm using the vxworks 6.1 version).  The function in the .out file just multiplies two inputs together, adds a constant, and returns the result.  I have put this inside a 1 kHz timed loop with a commanded period of 1 ms and via the Ticks(ms) block and shift registers I calculate the amount of time per loop execution.  This process is apparently taking 5 ms per cycle and to me that seems slow.  Is that roughly the correct execution time for this kind of setup?  I will attach my test .vi file.
    What I'm using:
    Windows 7
    LabVIEW 2009 SP1
    NI-cRIO 9024 with NI-RIO 3.4.0
    Solved!
    Go to Solution.
    Attachments:
    test DLL.vi ‏31 KB

    First off, the way you are doing timing isn't necessarily accurate because you don't know when the tick count VI is being called. For example, if it gets called on one iteration after your call library node executes, and the next iteration it gets called before the CLFN it executes, the subtraction doesn't include the call of the CLFN so you aren't seeing the true time it is taking for the dll to be called.
    Where it says "error" on the top left hand corner of your loop. left click and choose previous iteration timing. Also, do you have the ability to choose a 1 Mhz clock? Are you sure it's actually being run on the RT and not on your PC? Running it on the PC would definitely make it difficult to execute at a 1 kHz rate.
    CLA, LabVIEW Versions 2010-2013

  • Call library function node - function not found

    When creating a DLL I get a the Labview error "Call Library Function Node "LabviewReceiverDLL.dll:readDataJ1939Data' Function not found. Everything looks correct to me and this used to work, though I've changed computers since then.
    This is the beginning of my C++ code just to show my function name. I've also attached the Call Library Function Window to show my setup.
    Thank you in advance for your help.
    #include"StdAfx.h"
    #include<iostream>
    /* Call Library source file */
    extern"C"__declspec(dllexport)unsignedint readDataJ1939Data(unsignedint, unsignedint, unsignedchar, unsignedchar* canData, unsignedchar* path);
    unsigned int readDataJ1939Data(unsignedint ulTimeStamp, unsignedint ulIdentifier, unsignedchar uiDataCount, unsigned char* canData, constchar* path)
    Solved!
    Go to Solution.
    Attachments:
    Call Library Function.png ‏192 KB

    You mention that you have changed computers and that it used to work before.
    Could it be that there is another (older) copy of the DLL on this computer, and LabVIEW is loading the wrong one?
    The simplest way to check is to close your VI and delete the one you are expecting it to use.  Then open the VI again; if LabVIEW doesn't ask you where the DLL is, it is loading it from somewhere else.
    Batya

  • Call library function node: function not found in library

    I'm using Labview 6.1 and Windows XP.  I am trying to open some code, but it opens up with a broken arrow.  The error is Call Library Function Node:function not found in library.  Tried to configure the node, but no change.  Moved the DLLs to various directories (keeping them together) but again no change. 
    This code has been compiled and is working fine.  I'm just trying to run the source code to make some modifications.  Any suggestions? 
    Thanks
    CarlosV

    Thanks for the suggestions.  Tried it but had the same results.  The library I'm using is hpe1413_32.dll. 
    One thing I forgot to mention....doing a configure on the node, it comes up with the library: hpvscp32.dll and the function: hpe1413_error_message
    The function doesn't exist in the library.  So I set the path to hpe1413_32.dll which does contain the function. 
    After closing the configuration window and opening it up again, the library shown is hpvscp32.dll
    From what I can tell, there are three libraries involved:hpe1413_32.dll, hpe141332v.dll, and hpvscp32.dll
    Thanks again.
    Carlos

  • An exception occured within the external code called by a Call Library function Node

    Good Morning,
    I built a VI that contains Matlab nodes in Labview 8.0.  I made an executable and gave it to a colleage to use who is running Windows XP.  I see in the folder C:\Program Files\National Instruments\Shared\LabVIEW Run-Time that she has 7.1 and 8.0 run time engines installed.
    On Friday the executable ran great on her machine.  Today, when she tried running it I received the following error.  "LabVIEW:  An exception occured within the external code called by a Call Library Function Node.  This might have corrupted LabVIEW's memory.  Save any work to a new location and restart LabVIEW.  'my vi' was stopped at node 0x0 of subVI "NI_AALBase.lvlib:Real A x B.vi:1".  This error occured after part of the program ran properly.  More specifically, two of the matlab nodes ran perfectly.  I am unsure about the third because the program stopped too early.  I do have to multiply two matrices using the subvi Real A x B.  Is this causing the error?
    I also saw this error when I installed it on another computer.  However I do not see this error when I run the executable or the main vi on my machine  I know there are other discussions on this topic, however I do not know why it would affect some machines and not others.  Also, I do not know why it would work on Friday and not on Monday.  Should I have checked the box that said "Enable Debugging" under the advanced section when building the executable?
    If anyone could help, I would be very appreciative.
    Thanks,
    -Richard

    molecularvisions wrote:
    Good Morning,
    I built a VI that contains Matlab nodes in Labview 8.0.  I made an executable and gave it to a colleage to use who is running Windows XP.  I see in the folder C:\Program Files\National Instruments\Shared\LabVIEW Run-Time that she has 7.1 and 8.0 run time engines installed.
    On Friday the executable ran great on her machine.  Today, when she tried running it I received the following error.  "LabVIEW:  An exception occured within the external code called by a Call Library Function Node.  This might have corrupted LabVIEW's memory.  Save any work to a new location and restart LabVIEW.  'my vi' was stopped at node 0x0 of subVI "NI_AALBase.lvlib:Real A x B.vi:1".  This error occured after part of the program ran properly.  More specifically, two of the matlab nodes ran perfectly.  I am unsure about the third because the program stopped too early.  I do have to multiply two matrices using the subvi Real A x B.  Is this causing the error?
    This is most likely an error with the use of the Call Library Node, but not in the Real A x B.vi itself. This is a VI that comes with LabVIEW and has been tried and tested many times and unless your LabVIEW installation is messed up simply shouldn't fail in such a way on its own.
    However you do include Matlab code somewhere and that might be more likely to cause this. Are you using the built in MathScript node or some other way to communicate directly to a Matlab DLL or such?
    Are you using anywhere Call Library Nodes that you have created or that did at least not come standard with LabVIEW?
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to implement a callback function using LabView's Call Library Function Node?

    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    The SDK.h deacribes the function as:
    //  Function:   SdkSetPropertyEventHandler
    SdkError SDKAPI SdkSetPropertyEventHandler(
                SdkCameraRef                    inCameraRef,
                SdkPropertyEvent                inEvnet,          
                SdkPropertyEventHandler         inPropertyEventHandler,
                SdkVoid*                        inContext );
    //  Description:
    //       Registers a callback function for receiving status
    //          change notification events for property states on a camera.
    //  Parameters:
    //       In:    inCameraRef - Designate the camera object.
    //              inEvent - Designate one or all events to be supplemented.
    //              inPropertyEventHandler - Designate the pointer to the callback
    //                      function for receiving property-related camera events.
    //              inContext - Designate application information to be passed by
    //                      means of the callback function. Any data needed for
    //                      your application can be passed.
    //      Out:    None
    //  Returns:    Any of the sdk errors.
    A separate header file called SDKTypes.h contains the following data:
    typedef  SdkUInt32  SdkPropertyEvent;
    typedef  SdkUInt32  SdkPropertyID;
    typedef  void       SdkVoid;
    typedef  struct __SdkObject*    SdkBaseRef;
    typedef  SdkBaseRef    SdkCameraRef;
     SdkPropertyEventHandler
    typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
                        SdkPropertyEvent        inEvent,
                        SdkPropertyID           inPropertyID,
                        SdkUInt32               inParam,
                        SdkVoid *               inContext );
    Thanks for your help.
    Alejandro
    Solved!
    Go to Solution.

    alejandroandreatta wrote:
    I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
    me and I do not have the source code, just the .dll and .h files.
    The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
    callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
    Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
    this one out. I am using LabView 8.6.
    Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-11-2009 08:00 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call Library Function Node not Supported

    Hai,
    I have question to ask to NI members. I get an error said " Call Library Function Node 'LVASPT_WA.*ptDecimationFilterH':Node not supported". I use the call library function node in the FPGA.VI in my design. My question is, is it the function cannot used in FPGA.VI? I try to search a similar thread and find the manual but still can't find the answer. Anyone please clarify it to me. Thanks in advance.

    You cannot use Call Library Function Node in FPGA. The FPGA is hardware - it has no way to call an external library. If it is not immediately obvious why it's impossible for the FPGA to call a DLL, you should spend some time understanding what a FPGA is.
    You can integrate FPGA code written outside the LabVIEW environment, but that's not the same as calling a DLL.

  • Call Library Function Node: library not found or failed to load

    Hello,
    I had a VI that could not find some of the dll functions it needed.  It works on one machine and not on another.  So foolishly I copied the dll in question from the working machine and pasted it over the one on the non-working machine. 
    Now all my math functions are broken on the machine I copied the dll too.  The error is "Call Library Function Node: library not found or failed to load"
    And if I try to relink in the VI I get "Error loading C:\National Instruments\LabVIEW 8.2\resource\lvanlys.dll" A dynamic link library (DLL) initialization routine failed."
    I tried a repair labview and that did not help.
    I tried uninstall and reinstall labview and that did not help!
    Please help me fix this!
    Version 8.2
    dll: C:\National Instruments\LabVIEW 8.2\resource\lvanlys.dll
    Jim

    What library did you first copy?
    Also lvanlys.dll depends on the Intel Math Kernel Library that gets installed in a different location "C:\Program Files\National Instruments\Shared\MKL".
    This Intel Math Kernel Library again depends on the Visual C runtime libraries. Most likely you replaced one of those runtime libraries somehow and now the Math Kernel Library (MKL) fails to initialize which causes thelvanlys.dll to fail its load.
    Without a good view on your system and what other NI software you have installed it is very hard to recommend a good way of proceeding. There are various versions of the MKL used by various versions of NI products and just deleting the entire MKL folder might get you into trouble with other NI tools.
    Deinstalling everything from NI, deleting the entire National Instruments folder and then reinstalling what you need would be the most safe proceeding.
    And next time don't just copy some Visual C runtime libraries between machines. Their dependencies are complicated at the least and simply not graspable by us mere mortals. Use the according C runtime installer for the version you need as that installer will take care of installing the right versions of C runtime components and registering everything proberly so you do not usually run into problems with other applications using different versions of the C runtime.
    Message Edited by rolfk on 03-01-2010 10:26 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • VI analyzer: Wire under object test fails with Call Library Function Nodes

    Hi,
    If I wire a Call Library Function Node with an ErrorIn and an ErrorOut, the VI Analyzer Test "Wire under Object" fails always with two occurrences per Call Library Function Node.
    A double click to the occurrence highlights the error lines connected with the call... node.
    The test does not fail, if the error lines are not connected.
    Thanks!
    H
    Solved!
    Go to Solution.

    This became a problem when Call Library Nodes got error terminals (and optional path terminals) in LabVIEW 8.20.  I should be able to get a fix in to VI Analyzer Toolkit 2010.
    Thanks for taking the time to report the bug.
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

Maybe you are looking for