Jump to content

Search the Community

Showing results for tags 'dll'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Software & Hardware Discussions
    • LabVIEW Community Edition
    • LabVIEW General
    • LabVIEW (By Category)
    • Hardware
  • Resources
    • LabVIEW Getting Started
    • GCentral
    • Code Repository (Certified)
    • LAVA Code on LabVIEW Tools Network
    • Code In-Development
    • OpenG
  • Community
    • LAVA Lounge
    • LabVIEW Feedback for NI
    • LabVIEW Ecosystem
  • LAVA Site Related
    • Site Feedback & Support
    • Wiki Help

Categories

  • *Uncertified*
  • LabVIEW Tools Network Certified
  • LabVIEW API
    • VI Scripting
    • JKI Right-Click Framework Plugins
    • Quick Drop Plugins
    • XNodes
  • General
  • User Interface
    • X-Controls
  • LabVIEW IDE
    • Custom Probes
  • LabVIEW OOP
  • Database & File IO
  • Machine Vision & Imaging
  • Remote Control, Monitoring and the Internet
  • Hardware

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Company Website


Twitter Name


LinkedIn Profile


Facebook Page


Location


Interests

  1. I'm trying to use a DLL which is developed by a third party. I created wrappers using Import Shared Library Wizard. When I call this function: int _Initialize(char *ipAddress, int *cameraCount); I get error 1097. I've checked the parameter setup, etc. I think it should be correct. Only one thing seems a bit weird.If you look at the prototype definition in CLFN-configure window, the function name is something totally different than selected. So, I'm wondering if this has anything to do with the actual problem? Header looks like this: #pragma once#include "PeakStructure.h"#include "Callback.h"#ifdef EXPORTING_DLLextern _declspec (dllexport) int _Initialize(char *ipAddress, int *cameraCount);#elseextern __declspec (dllimport) int _Initialize(char *ipAddress, int *cameraCount);#endif
  2. I am developing a packed library that puts a LabVIEW wrapper on calling functions from a single DLL, and have noticed that, when building it, it does not grab the nested DLLs that are being called by the main DLL. Is this a known behavior? And can I set it to copy all dependencies into the builds folder? I know I can manually set it to include specific files, but seeing as the dependencies are listed within the DLL itself, I would imagine that LabVIEW would automatically dig through those files and find all the dependencies. I'm using Labview 2012, and the DLL is written in C#.
  3. Hello, I am trying to call a function from a dll with a pointer to a complex struct. I have tried multiple ways to represent the string in the struct (see attached typedefs), but the output clusters from the dll call always has the same values as input (i.e the dll isn't updating the output values). The ref ptr is based on an example from this link and I have attached a screenshot of my code for this case: https://decibel.ni.com/content/docs/DOC-9079 Here is how the vendor defines the struct: typedef struct { dword passkey; //password dword request; //0=readprop, 1=writeprop, 2=writerelinquish dword deviceid; //device instance dword objectid; //objectid dword propid; //property id dword arrindex; //array index dword datatype; //see simpletypes dword value; dword errorclass; dword errorcode; dword priority; //1..16 union { char sval[1500]; wchar_t wval[1500/2]; byte bval[1500]; BACnetDate dval; BACnetTime tval; datetime dtval; directaddr da; HWND listbox; bufptr buf; Range rg; bdrCOV cov; pxfer *px; }aux; } bdrbag; Here is how the vendor defines the struct in their vb example: Type bdrbag passkey As Long 'password request As Long '0=readprop, 1=writeprop, 2=writeproprelinquish deviceid As Long 'device instance ObjectID As Long 'objectid propid As Long 'property id arrindex As Long 'array index datatype As Long 'see simpletypes value As Single errorclass As Long errorcode As Long priority As Long '1..16 sval(0 To 127) As Byte 'string value End Type Thanks, Russell TYPEDEF_BACNET_bdrbag_byte_cluster.ctl TYPEDEF_BACNET_bdrbag.ctl TYPEDEF_BACNET_bdrbag_ref_ptr.ctl
  4. First post LAVA, let's see how it goes... I'm propably missing something obvious here? I'm trying to call a DLL which takes a struct as a parameter. When I run the code, I get these two errors and LABView crashes. Any ideas?
  5. hi everyone here! recently i have come to a odd problem with lvrt(ets) and have no idea about how it goes. My project uses 10 or more dlls which were wrote by third party and had been put into the RT's C:ni-rtstartupdata folder, and this path had been added to the system find path list. Each of the dlls may have several VI calls(each for different functions in the dll) in the project. And when i try to deploy the whole project, my RT hung with one of it's cpu went to 100% loads. And the odd thing is, when i try to disable one of the dll (means to disable all the vis that call the dll through the "call library function node"), the deploy goes with no error and my application can run as expected except the disabled parts! During the past one week's struggling with this deploy problem, once i can come to a particular configuration (by removing some no use modules in the RT or changing the dll call's from "run in UI thread" to "run in any thread"), and under this situation ,i can deploy my project to rt, but when i run, a exception string appears on the RT's screen, which says "flushing disk cache" and something like "system error". Here i have two questions: 1, does the ets os system have a max number of user defined dlls that can exist in memory at the same time? 2, does anyone come to the "flushing disk cache" error before in the ets system? can you share some experience with me? any suggestions are welcome and will be appreciated. i am looking forward to your share, many thanks in advance!
  6. Hello, Before, going any further let me answer the question that I know you will ask: "Why would you want to do THAT?" We are creating a LabVIEW instrument driver for a new instrument. The instrument manufacturer wants to provide also an instrument driver in the form of a dll. They are aware that if the DLL is built with LabVIEW the end users will need the LabVIEW RunTime Engine and they are OK with this. (At least for now). So, LabVIEW users will get a LabVIEW palette API installed in their palettes that will let them communicate with the instrument. Other developers would get the DLL directly. We figured that it would be best to "eat our own dog food" and use the same dll we will create for the C developers as the basis for our instrument driver. This way we can test the dll as we go and if there is push back from the instrument manufacturer's customers to move away from requiring the LabVIEW RunTime Engine, we could replace the DLL built in LabVIEW by one created in C and the rest of the LabVIEW palette API code would still be the same. Cool, now, what do you need from the great LAVA community? We have been looking for documentation on how to do this and there is not much we can use. Our main question is What's the best way to configure the function prototype for a DLL built in LabVIEW so that a string (or U8 array) output of unknown size will not require arbitrarily-sized pre-allocation by the caller? Is this even possible? The main problems we have encountered so far: 1) Getting only the first two bytes of a string output from the DLL function --> Solution: even if the DLL function call has the string inputs and outputs defined as "C String pointers", when we call it in LabVIEW we change the function node call parameters definition to expect an array of 8 bits Unsigned Integers. This lets us initialize an array of uint8 of the size we expect and then use the byte array to string from the output. However it requires that we pre allocate an array by initializing the array of uint8. Question: Would defining the string as a "Pascal String Pointer" remove the need to know in advance how large the string needs to be. We haven't been able to make this work. Is the use of Pascal String Pointer recommended? If it is, how should we handle the DLL source code and the "Call Library Function Parameters"? 3) We have found on several NI forum posts reference to LabVIEW.dll calls that could make our life easier by providing us access to the LabVIEW Memory Manager (for example DSNewPtr()). These functions are documented in some places, we even found one of them in the LabVIEW 2012 manual (http://zone.ni.com/reference/en-XX/help/371361J-01/lvexcode/aznewptr_dsnewptr/) Question: Do we need these functions? If we do, would they be used inside the DLL source code or to manage the inputs/outputs of the "Call Library Function Node". If we need them where can we find more documentation about the use of these functions? 4) We are defining the VI Prototypes for our DLL to use "C Calling Conventions" the other option is "Standard Calling Conventions". The help says: Standard Calling Conventions—Sets the function prototype to use standard calling conventions. C Calling Conventions—Sets the function prototype to use C calling conventions. This radio button is enabled by default. Question: Despite the accuracy of the help description ... well ... are we doing the right thing by using the C Calling Conventions? Any help will be appreciated. Thanks in advance for your time, Fab
  7. I know there is the windows message queue API that can be downloaded, and I have this working fine and am receiving messages. But unfortunately this requires polling the message queue in my application. I'd like to handle these messages as events in an event structure, and I can do that by having a polling loop to manage the message queue, which then fires a user event when the correct message is captured from windows. But, is there a way to do this any cleaner, similar to being able to register events based on callbacks?
  8. I need to provide a customer with a dll library with function prototypes that exactly match a provided .c header file. I would like to use LabVIEW if at all possible, as fast turnaround on source code modificaiton may be required. LabVIEW cannot export a function with a char* return type (verified by LabVIEW R&D), thus the customer application directly calls a thin wrapper dll (written in CVI) which then calls into the LabVIEW based dll. I have a subvi that is called by one of the exported VIs. This subvi acquires and analyzes waveform data from an instrument. Memory for a significant waveform (on the order of a MB) is thus dynamically allocated within the subvi. The waveform is not passed up to the caller, and the exported VI returns only a scalar double. If I remove the subvi from the exported VI's block diagram, other Exported functions behave as expected, However if the offending subVI is added to the block diagram of the exported VI, other exports in the DLL always return a value of "0" (default value for most numeric data types?). This is regardless of whether the Export that includes the SubVI is even called within the client application. It seems that the mere inclusion of the offending SubVI breaks the entire dll. Both the LabVIEW DLL and the wrapper DLL(which is in CVI) use only the cdecl calling convention. I get the same behavior for LabVIEW 2011 and 2011 SP1, and for CVI 2009 and 2010. I'm testing using MS Visual Studio C++, since that is the environment for the client application. Behavior is the same in VS 2005 and VS 2010. I definitely appreciate any insights or ideas regarding how to seek a resolution.
  9. Hi guys, I have a wrapper to a DLL which was written in C, now the DLL used from the wrapper was updated to a new version, so I have to reload the DLL into the "Call library function" for each function of the wrapper that I've already created and it is a very boring job. Therefore, I would like to know if exists a trick to use to update all functions of a dll wrapper in one shot? Does it exist?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.