LabVIEW Error in DLL with pointor

Hi,
Sorry for my very very bad english....
I developped a DLL in Visual C++. In this DLL, I call functions with pointors like parameters. The DLL works very well under Visual but when I call it under LabVIEW 7.1, LabVIEW gives an error when a pointor is read or modify.
Can someone help me? Thanks
Bonjour,
J'ai développé une DLL sous Visual C++. Dans cette DLL, j'utilise des sous-fonctions en leur passant des pointeurs. La DLL fonctionne très bien sous VIsual C++ mais sous LabVIEW 7.1, LabVIEW retourne une erreur (l'exécution s'arrête) quand la DLL veut modifier ou lire un de ces paramètres.
Avez-vous déjà rencontré ce problème et avez-vous réussi à le résoudre? Merci

Ok Dynamik, I understand your answer. I knew these properties for "Call Library Function". The pointers aren't in LabVIEW but in the DLL: I pass under LabVIEW an parameter with "Type" adapt to the type in LabVIEW (I have a French LabVIEW and it says "Adapter au type"). This parameter is a cluster of clusters. In the DLL, it becomes a structure of structure with the same order as the cluster.
Then, I pass the address of this structure in an other function of the DLL for modify it.
Perhaps, it isn't a pointer's problem but an problem of cluster transfert. What do you think?
Attachments:
DLL call.JPG ‏356 KB

Similar Messages

  • APAgent.exe error dnssd.dll on startup with the suggestion to reinstall. How do I remove the error?

    I am giving away my windows XP laptop to my 80 year old Mom and deleted itunes and ipod software.
    Now getting APAgent.exe error dnssd.dll with the suggestion to reinstall. How do I remove the error? I don't want to reinstall on this laptop.

    Did you uninstall Bonjour from the PC? Airport software uses Bonjour, and it looks like your Airport base station agent is complaining about the missing Bonjour (dnssd.dll is a Bonjour file).
    Is your Mom going to be using the Airport capabilities of the laptop? If not, it might be easiest just to uninstall the Airport utility and/or other related Airport software.

  • Error Building DLL, LabView 8.2

    Hello everybody,
    I'm building a
    CVI application. I need some functions of LabView (related to time
    series analysis), so I'm trying to build DLLs with the .VIs I need. I
    followed all the steps necesary and visited all the related topics at
    ni.com. I always get the following error:
    Visit the Request Support page at ni.com/ask to learn more about resolving this problem. +¡
    Use the following information as a reference:
    Error -2147221480 occurred at Building DLL stub.
    This can be caused by illegal function or parameter
    names. Please verify your names are legal C identifiers and do not
    conflict with LabVIEW headers
    This error code is undefined. No one has provided a
    description for this code, or you might have wired a number that is not
    an error code to the error code input.
    Once, I got a correct DLL with no errors, so it should be possible for others.
    This is an example of what I'm trying to compile:
    And this is what appears, only for a moment, at the end of the
    compiling (it didn't appear when I manage to build with no errors):
    I'm using: LabView 8.2, LabWindows CVI 8.5, NI-DAQ 8.5, Windows XP (SP2)
    Any suggestion is really appreciated.
    Maybe another way to use this functions in CVI (I need functions related to spectral estimation, ARMA; MUSIC,...)
    thank you!
    Eduardo Tamargo
    Spain

    Hi Tamargo,
         The following KnowledgeBases may help you find out what is happening:
    Creating and Calling LabVIEW DLLs with Various Data Types from Microsoft Visual C++
    What are the Differences Between "Array Data Pointer", "Array Handle", and "Array Handle Pointer"?
    Calling a LabVIEW DLL from C with an Array in a Cluster as a Parameter
         Have you tried developing a very simple VI with an array as an input parameter and checking if the same problem takes place when you build the DLL?
    Regards,
    David Oña

  • PXI RT 8.6 crash with error lvrt.dll load address 0x1924000

    I have an application developed with LabView RT 8.6 that run 24h/day and randomly crash evry 3-10 day with this error:
    LVRT.DLL load address 0x1924000. Attached I put log file available after restarting PXI.
    I dont found any information on this error, and it's very hard to found the soluction... any idea?
    Attachments:
    lvrt_err_log.txt ‏66 KB

    Application was developed with LV 8.6, actually I have installed a LV 8.6.1 in my lap top where I develope the application. I attach some print screen of configuration of PXI.
    Application running on PXI consist of several never-ending loop, one of this is a time-critical loop where I from CAN, DAQ, and I send data via CAN. There is other Hardware-timed loop that comunicate via TCP/IP with PLC and with host computer (but application on host is not developed with LV, use a client socket to comunicate with PXI for reading data).
    Error Log show alwayis the same error, and for my opionon, there is no relation for when the event occur, can be in any moment.
    Application in pxi has some VI that are published as web service for diagnostic only, but there is no any interaction with user, (no keyboard and no mouse), it's a silent application, that read some encoder, calculate speed and aceleration, generate some output and send all data acquired via tcp/ip... 24 h/day.
    Strange is that error position is always at 0x1924000, in all the error log!
    Unfortunatly system is used all the day, and it's very far from office, so debug can be done only at specific day, when production is off... and internet is unavailable...
    Enabling the debug mode, It's possible to have more information about the problem without changing the performance of the system?
    Thank's for you help!
    Nicola
    Attachments:
    img1.JPG ‏36 KB
    img2.JPG ‏28 KB
    img3.JPG ‏29 KB

  • Application crash with error ntdll.dll 00018fea

    Hi,
    I have a problem with my app.exe build.
    I attach a simple code; the Vi open and close a TDM file.
    If I run this Vi in Labview works fine.
    If I build the application.exe on a notebook and I run it I got "Application crash with error ntdll.dll 00018fea".
    I've tried to build the Vi on another Pc Desktop with Labview and here if I run the exe it works fine.
    On the two PC I have LV8.5; the build options are the same.
    On the notebook I've try also to reinstall LV8.5 but I got the same error.
    Can you help me?
    Thanks a lot
    Attachments:
    open tdm.vi ‏33 KB

    MicheleS wrote:
    This morning I've try to put the ntdll.dll of the other PC in the notebook but the problem remain.
    Never ever do that! You were very lucky that both ntdll.dll files were probably the same version so the exchange didn't do much but ntdll.dll is one of the core Windows DLLs were everything goes through that normal applications may access in Windows. A mixup in such a part because of incompatitible ntdll.dll with other system API DLLs might prevent your computer entirely from starting up even in safe mode.
    You should not attempt to ever switch system DLLs between different computers. In such behaviour lays insanity. If you expect a system DLL to be corrupt attempt to do a repair installation instead. Also Windows nowadays has techniques to detect if a system DLL got corrupt and will attempt to repair it, though I guess if ntdll.dll would go belly up it's likely your computer won't even start up.
    Rolf Kalbermatter
    Message Edited by rolfk on 01-14-2008 08:05 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Make a DLL with LabView??

    Hi LabViewers!!
    I'm doing a program with C++Builder and I would like to use some
    features from LabView, and I think that I can do that creating a dll
    with LabView but I dont know if this is possible. Could someone tell me
    if there is another way on making this task?
    Thanx in advance.
    Juanmi.
    Juan Miguel Delgado Garcia de Soria.
    Electronic Engineer.
    Universidad de Cádiz. (SPAIN)

    > I'm doing a program with C++Builder and I would like to use some
    > features from LabView, and I think that I can do that creating a dll
    > with LabView but I dont know if this is possible. Could someone tell me
    > if there is another way on making this task?
    >
    LV can't build DLLs yet. If you are using a recent version, > 5.0, then
    you can use the server interface to have LV carry out an execution and
    pass back the results. This will work in a separate EXE, even on another
    computer if that helps.
    The server works LV->LV over TCP, and it also supports ActiveX; so other
    environments can control it and have it do executions for them. There
    are also some C++ classes on the ftp site that make the ActiveX controls
    a little more natural in C++.
    Greg McKaskle

  • Error calculatio​n with LabView

    I am just courious, maybe someone did such error estimation with LabView, and can show me a better approach.
    Scenario:
    I have the following function with one variable (x), K is a constant:
    y = ( -1/2*K + SQRT( 1/4*K^2 - (4*K - K^2)*(x^2 - x) ) ) / (2-1/2*K);
     I have x as an input, and I know the error of x at certain positions.
    I would like to estimate the error of the result y values from the given x values.
    Since this is not a monotonic function (the first derivative changes sign), the standard Gauss error propagation formula with the first partial derivative is not enough here. The first derivative of the above function is simple to
    get analytically, but the second would be a pain to calculate...
    How would you treate such a problem with LabView, maybe some kind of numerical derivation to get second (or maybe even third derivative from the Taylor series?) derivative?
    Right now we just use a more simple error estimation:
    we slightly over-estimate the error of y in the following way: 
    delta_y = MAX { ABS(y(x)-y(x-error)) ; ABS(y(x)-y(x+error)) }
     So we take the higher difference as an error.
    How would you do it differently if you have LabView under your hands? (LabVew pro 2013 + almost all toolkits)
    I could not find error calculation related VIs in the drop menu, are there any?
    Thanks for any advice!

    Blokk wrote:
    I use formula nodes often
    I think my post would be more appropriate in the Idea Exchange forum. Maybe someone can move it there...
    The idea would be that to have ready made VIs for general often used error calculations...(Gauss error propagation, confidence level, definitions, etc..)
    So the LV user could save dev time...?
    If you have some formula nodes ready to go that might be useful for others, but don't quite have them packaged as VIs yet, it might be faster (and go through less bureaucracy) to just post them up here. I'm sure someone could repackage them according to standard LV connection panes (maybe even do some clever icon designing) and would post them on one of the popular LV Tools repositories.
    As far as I can tell by just following threads on this forum, the NI engineers already have so many suggestions, fixes, etc. that getting a brand new "this would be nice" Idea added to the LV shipping program is going to take a little less than forever to implement, especially if it would only involve combining functions already available. (No indictment of you, NI engineers, it's just that we users seem to be really good at producing Ideas and we do outnumber you .)
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • TS1424 i cant open up itunes, comes up with error mcvcr80.dll was not found

    help
    itunes will not upgrade not can it open after re installing
    i get the error mcvcr80.dll was not found

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99504)

  • Generating DLL with LabVIEW - A basic question

    Hi everybody !
    I'm trying to generate a simple DLL with LV. I have read as much as I could on the subject, prepared a small test vi (calculate x*x), built the corresponding dll, inserted and configured the ddl into another vi... Every thing seems to be fine, except that the ddl returns 0 whatever I'm doing.
    I'm obviously missing something here, and I would be very gratefull if somebody could guide me out of this stupid corner.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

    Hi Chrisger & Becktho !
    Thanks for your replies.
    Unfortunately I'm still stuck.
    First thing is that I followed already exactly the path develepped by Chrisger. I also tried changing the calling convention as suggestedc by Becktho. No success.
    Second thing is that the ddl provided by Chrisger works perfectly (sorry Becktho, you just forgot the attachment...). At least that's something that shows I'm not entirely stupid, since I'm able to use a DDL compiled by someone else !
    So, this seems to be a problem related to the way I am generating the DLL. Just in case, I have attached here the files I'm using (the source, the .bld file, and the generated DLL. Could you give them a look/trial ?
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Test DLL.zip ‏18 KB

  • Call function in LabView from a DLL, then access global variable from DLL

    I have created a DLL in LabWindows with a function and a structure.  I want to call the function from within LabView and then access the global structure.  I am able to call the function from the DLL with a "Call Library Function Node" and can access the return value, but I cannot figure out how to access the global structure.  The structure is declared in the DLL header file with __declspec(dllimport) struct parameters.
    Is there any way of accessing this structure without using the Network Variable Library?
    Solved!
    Go to Solution.

    dblok wrote:
    When you say "access to" or "the address of" the global variable, do you mean to pass the variable as an argument to the function call in the DLL?  If so, then I was not really sure how to pass a cluster from LabView by using the "Call Library Function Node".
    Yes, that's exactly right.  I would include a pair of helper functions in the DLL to read and write the global variable.  Alternatively you might write separate helper functions for each field inside the global structure, depending on the number of fields and whether you want to do any validation on the values.
    You can pass a cluster by reference to a function that expects a struct by setting the parameter to Adapt to Type, so long as the cluster does not contain any variable-length elements (strings or arrays).  The cluster needs to match the struct exactly, and sometimes that involves adding extra padding bytes to make the alignment work.  Variable-length elements in LabVIEW need to be converted to clusters containing the same number of elements as the struct definition (for example, if your struct contains char name[12], you would create a cluster of 8 U8 values, and you could use String to Array of Bytes followed by Array to Cluster to convert a LabVIEW string into that format).  If the struct contains pointers it gets more complicated, and it may be easier to write functions in the DLL to access those specific elements individually.
    If you can't get this working or need help, post your code and an explanation of the error or problem you're seeing.
    EDIT: it is also possible to include a single function in the DLL that returns the address of the global variable, which LabVIEW can then use to access and modify the data, but that's more complicated and likely to lead to crashes if you don't get the memory addressing exactly right.

  • DIAdem Application Error (mfc71u.dll)

    Hi, I'm working with an application in DIAdem who analize some data that LABview acquire and save the result in one file ("BRAKE_#.TDM") every test.
    I've got some error saving this files:
    23   19:15:34 Error:
         Error while executing "DATASAVE("Brake_1231")" command
         Error type: ACCESS VIOLATION
         Error address: 00009E81
         Module name:kernel32.dll
    24   19:15:34 Error:
         Error in <Rumore.VBS> (Line: 234, Column: 5):
         Error while executing "DATASAVE("Brake_1231")" command
         Error type: ACCESS VIOLATION
         Error address: 00009E81
         Module name:kernel32.dll
    25   19:16:08 Error:
         Error while executing "" command
         Error type: ACCESS VIOLATION
         Error address: 000631BA
         Module name:gfsdesk.DLL
    Sometimes also DIAdem crash and in the EventViewer there are this errors (the PC where run the program is in spanish):
    Aplicación con errores: diadem.exe, versión: 10.0.0.2658, módulo con error:
    mfc71u.dll, versión 7.10.3077.0, dirección de error 0x00023fee.
    or
    Aplicación con errores: diadem.exe, versión: 10.0.0.2541, módulo con error:
    mfc71u.dll, versión 7.10.3077.0, dirección de error 0x00023fee.
    Someone can help me ?
    Thanks

    Hello MicheleS! Hello Brad!
    In the past I ran several times into the same strange error messages. The DATASAVE AV was never the reason, but it was always the symptom for a corrupt memory content. In my case it was caused by extension DLLs (GPI) I used (and developed).
    I recommend to find the reason for the 'mfc71u.dll' AV.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Creating Dll with Vision Library

    Greetings Board Members,
    I have a small Application For which i want to make a shared DLL and test them before deploying at other co worker computer, The application uses the Labview Vision, The DLL are made by Building the DLL.
    When I use the same dll and call them with labview i get an error code while the VI Modules with which DLL are made are used instead of DLL they are running OK. Can some one throw light on this issue and how it can be solved. The application is simple, Initialze USB Grabber, Snap and save image, Close Grabber. I am getting Error code in snap and save image.
    Regards
    Harjeet

    1.What is the error number or describtion you get?
    2.Do you know that you will need to have a vision runtime license ($) at the other computers where you want to run the dll?
    Christian

  • NI System Configuration APIs - Init session - Error nierinterface.dll

    Hi,
    i tried to use the VIs from the system configuration api:
    http://zone.ni.com/reference/en-XX/help/373107E-01/nisyscfg/initialize_session/
    When i start my VI or if i try to open the VIs "init session" i got the message
    System Error
    nierInterface.dll is missing.
    Reinstall the software.
    Google Search "nierinterface.dll" -> 0 resulst
    NI Forum Search "nierinterface.dll" -> 0 results
    Can someone tell what DLL that is? How should I find it, when google doesn't know that :-) Very funny :-)

    Hi sjunge,
    it seems that something went wrong during the installation process.
    Which version of LabVIEW and which drivers are you using?
    First I would try to reinstall the NI System Configuration you can finde it here:
    Downloads
    Just search for "NI System Configuration". When choosing the version be sure to select a download which is compatible with the rest of your Software.
    If reinstalling the NI System Configuration Tools don't work, I would recomment to do a reinstall / update of LabVIEW and the Drivers you need. 
    Ensure that you have admin rights and that you deactivated virus scanners or firewalls so they can't interfere during the installation process.
    Best Regards,
    Lam

  • Sent SequenceCo​ntext to a dll with InvokeNode

    Hi,
    I want to pass the SequenceContext of a Teststand sequence from LabVIEW to a dll.
    But when I connect my SequenceContext control to the parameter of the InvokeNode, I get the error "Broken Wire". Please see attached picture.
    Any idea?
    Regards,
    Risotto
    Attachments:
    brokenwire.jpg ‏76 KB

    Hi Brian,
    I will try to explain you what I am trying to do.
    I write an application which purpose is to test a software in an embedded electronic in a car. I control supply voltage, signal generator with Teststand and let run in parallel a time-loop which do some measurement with a PCI-6014 each 50ms, so that I separate the control part from the measurement part - the time-loop runs  independently on what happens with Teststand.
    The time loop save on a separate task - in C# - the data in a buffer and then in on the disk. Now, I need sometime to transfer some data from LV to TS. I already wrote VIs to do this, but the problem is that LV is not "completly" multitasking - we have a single processor computer and we run on Windows2000. During the data transfer, my time loop as not enough time to do the measurement each 50ms. I already tried to rise the priority of the measurement task and lower the priority of the transfer VI, but I doesn't change anything. I can reduce this problem if I transfer more often the data (less data to transfer means littler transfer time), but I am not comfortable with it. And in some test, I need to do measurement during 60s and then to transfer the data.
    So I realize that I need to put the transfer functionality outside of Labview: either Teststand or C#. On other side, I can't base my data acquisition whithout  rewrite almost all my VIs. This means, I have to put somehow the data in a kind of buffer in a C#-variable and then access directly from Teststand to this variable to get the data: so the transfer would run outside LV and I hope I will not get the jitter on my time-loop.
    I work at the moment on a possible use of .NET Remoting to resolve my problem - actually Brian, you give me the idea. I am not completly through with it, but I have done some progress and I think I could find a solution whith it. But which kind of results, I don't know actually. This is why I am looking for alternativ solution.
    So I hope I could explain what I am trying to do.
    Regards,
    Risotto

  • How to use a C# dll with JNI

    After a ton of issues, I finally got this working properly. I've come across a lot of forum posts about the various problems and VERY few answers so I thought I would post my solution here.
    To do this, you need to create a managed C++ layer in between C# and java. The JNI functions in C++ dll can make calls to the C# dll directly, and your java program can make calls directly to the native JNI functions. Some important notes on using C# classes in C++ are:
    -gcroot<CSClass ^> should be used on any objects that are instances of some C# class.
    -the symbol ^ should be used with all C# references (its the symbol for references)
    -gcnew should be used to allocate C# objects
    -in visual studio, add the C# dll as a reference rather than using #using <CsDLL.dll>
    -do not use #using <CsDLL.dll>
    The next issue is loading the libraries. By adding the folder your C++ dll is located in to the Djava.library.path VM argument, you can load your C++ library with System.LoadLibrary("Cppdll.dll"). You DO NOT need to load the C# dll in your java program. In fact, it will ignore you if you try. The problem with loading this dll is with how the CLR searches for referenced assemblies. The CLR First searches the DEVPATH environment variable (if the machine.config file has developer mode set to on), then it searches the GAC, then it searches the codebases, then it searchs the current executable's directory along with a list of definable subdirectories (probes).
    DEVPATH is a decent option, but it requires modifying the machine.config file to be in developer mode. Once that is done, it acts just like the PATH environment variable.
    If your C# dlls are strongly named, I would recommend adding them to the GAC or using codebases. However I have not done this and am not sure how.

    Hi,
    i have to use a c# dll in my java program .by following this link http://www.codeproject.com/KB/cross-platform/javacsharp.aspx i done that.but it is working for only one c# program.if i am trying to use a dll it is throwing error
    # An unexpected error has been detected by Java Runtime Environment:
    # Internal Error (0xe0434f4d), pid=3988, tid=3704
    # Java VM: Java HotSpot(TM) Client VM (11.0-b16 mixed mode, sharing windows-x86)
    # Problematic frame:
    # C [kernel32.dll+0x442eb]
    # An error report file with more information is saved as:
    # D:\Work\EclipseWorkspace\HelloInflux\hs_err_pid3988.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    Please help me out. i want a few steps to invoke a c# dll by using jni

Maybe you are looking for