LabVIEW MoveBlock and obtaining of a string from a DLL (assigned by the DLL)

Hello classmates addicted LabVIEW,.

I have a small question about the LabVIEW MoveBlock function.

For a project I need to use an external DLL that must be called by my LabVIEW program.

Essentially, the DLL returns a void * to a buffer and the size of the buffer (size_t). This stamp is just the string being returned by the DLL data. The DLL allocates these data and later in the program that I need to pass this pointer to a second function of the DLL to explicitly inform the DLL that I made using the data, so it can release these data.

Here is the documentation for the function I want to use:

Since you say the works of XNode, then you're dealing with a pointer and not a handle (pointer to a pointer), so you should be to pass the address of MoveBlock by value and not as a pointer to a value.

Tags: NI Software

Similar Questions

  • Why not the preferences of the general calendar for "the day ends at:" only offers the possibility of 'am' and not 'pm '? And alerts for an event from 14:00 activate at the right time, but it's at 02:00.

    The "day starts at:" options correctly offer options of "midnight" through time "am" to "noon". Thus the "day ends at:" should have options starting with "midi" and moments of "pm" to "midnight", but instead, they are all time 'am '.

    And alerts for an event from 14:00 activate at the right time, but it's at 02:00. Maybe it's a consequence of the above.

    ???

  • I'm on Windows 7 Ultimate edition and I get a message from Windows C++ Runtime saying the appliction invited to stop in an unusual way, so I poster a crash with this screen:

    Signature of the problem:

    Problem event name: APPCRASH

    Application name: lpksetup.exe

    Application version: 6.1.7600.16385

    Application timestamp: 4a5bc613

    Fault Module name: msvcrt.dll

    Fault Module Version: 7.0.7600.16385

    Timestamp of Module error: 4a5bda6f

    Exception code: 40000015

    Exception offset: 00056202

    The system version: 6.1.7600.2.0.0.256.1

    Locale ID: 1046

    Additional information 1: 54e2

    More information 2: 54e26c8506b86b9d38c8dc6d2d148c48

    3 more information: a32c

    Additional information 4: a32c8d619b58fe3a5351fc1f9e37edd7

    I don't use any anti-virus or anti-spyware, except Windows Defender.

    I suspect that you see the effects of a hijackware infection. Since you have no applications installed virus protection (and, I suppose, you have not installed in Windows XP is), my recommendation is the following:

    Backup of personal data (which none should be considered 100% reliable at this point) then do a format and clean install of Windows XP.  (Because you upgraded from Windows XP to Win7, you can not do a clean install of Win7.) Please note that a repair installation (upgrade AKA on-site) won't fix this!

    CF. http://michaelstevenstech.com/cleanxpinstall.html#steps

    Once installed the clean, you will have the equivalent of a "new computer" in order to take care of everything on the next page before connecting the machine to the internet or a network otherwise and before using a USB key that is not brand new, or has not been freshly formatted:

    5 steps to help protect your new computer before going online
         http://www.Microsoft.com/protect/computer/advanced/XPPC.mspx

    Other useful references include:

    HOW to get a computer that is running Windows XP Gold (no Service Pack) fully patched (after a clean install)
    http://groups.Google.com/group/Microsoft.public.windowsupdate/MSG/3f5afa8ed33e121c

    HOW TO get a computer that is running Windows XP SP1 (a) or SP2 fully patched (after a clean install)
    http://groups.Google.com/group/Microsoft.public.WindowsXP.General/MSG/a066ae41add7dd2b

    NB: You need to be under WinXP SP2 or higher before you would be able to switch to Win7 again.

    See also:

    Measures to help prevent spyware
    http://www.Microsoft.com/security/spyware/prevent.aspx

    Measures to help prevent computer worms
    http://www.Microsoft.com/security/worms/prevent.aspx

    Avoid fake security software!
    http://www.Microsoft.com/security/antivirus/rogue.aspx

    Good luck.

    [I watch is no longer this thread].

    ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft

  • Where can I find information, date, time and camera for pictures transferred from an older version of the EP?

    I saved all my library the old version of Apple fron and transferred the file to PES 11.  I don't know where it is in PES 11

    I bought AppleCare with the new computer and called today for help.  With their help, I downloaded iPhoto Library upgrade and used to update the original iPhoto library.  Then I deleted the photos in the Organizer in PSE and imported the Library upgraded to PSE.   Now I have the file information of photo that was missing before.  Thanks for your help.

  • How to pass a string to a vi from a dll?

    I have a DLL that generates errors in the log. How can I display my Panel before these errors? In other words, how to pass a string from a DLL to a vi using the library to call feature?

    Thank you

    Diego

    The DLL actually allocates memory for the string? If this is the case, there should be another function to free the memory. Otherwise you won't be able to do the deallocation of LabVIEW, which means you would have to write a wrapper DLL. If you do not have the deallocation, then you will have a memory leak.

    Are you sure that the DLL is not simply wait for a buffer "of a proper size? In this case, you can simply create a U8 in LabVIEW to a size that is larger that the largest string that you expect to get.

  • Is it possible to restore an iPhone on a previous backup?  My phone was stolen 2 weeks ago and took me off but the thief has changed a lot of my apps and things.  I just want to know whether and how to restore them from before flight

    Is it possible to restore an iPhone on a previous backup?  My phone was stolen 2 weeks ago and took me off but the thief has changed a lot of my apps and things.  I just want to know whether and how to restore them from before flight

    How the thief has changed a lot?

    You do not have a password, find my iPhone ON?

    Read here for the restoration of the backup: http://support.apple.com/en-us/HT201252

  • How to transfer emails from a user account on the same computer on Windows mail in Windows Vista

    my name is misspelled when accounts set up for the user after the clean install of Vista Home Premium. I want to create a new account with my name correctly spelled and remove the old once I have everything transferred to the new account. Create the account and transfer my document folders, I think that presents no problems (all my documents are in an external drive), but I'm not sure of the correct way to windows mail transfer. I saw an article inhttp://windows.microsoft.com/en-us/windows-vista/Fix-a-corrupted-user-profile, but it says nothing about the only thing I need and that is to know how to transfer mail from windows. I just reinstalled vista a week ago and I'm still working from my external hard drive, the only thing I really have to transfer from the old account because my Windows Mail. Any help would be appreciated

    http://www.Vistax64.com/tutorials/90298-Windows-mail-messages.html

    See if the above tutorial will help you.

    See you soon.

    Mick Murphy - Microsoft partner

  • There is a possibility to run Labview projects or to set them off from a batch file or if the exist and the ability to control labview or run it from an external application?

    Hi, I m a bit new in LabVIEW and I'd like to ask a few questions...

    -There is a possibility to run Labview projects or to set them off from a batch file or if the exist and the ability to control labview or run it from an external application?

    -One API PI or raspberry beaglebone exists for LabVIEW?

    -Power supply Wich can recommend you control with LabVIEW? (some chip solution witn 0 - 30v / 0 - 3A DC)

    Thank you very much for your advice!

    Best regards

    Elena

    Elena,

    I know raspberry, so no comment on that.

    For the rest:

    -Do you want to create tools for developers? If so, we must look in the API of project VI and VI server. If this isn't the case, please compile your application LV as executable and call this one using a batch file.

    -LV prefer specific supplies. LV is a programming language. There are several power supply providers (including OR) which provide directly the LV API for their power supplies. So, essentially, the approach is:

    1. choose food that serves your needs.

    2. check if the power supply has a standard interface for programming (such as Ethernet, GPIB, or if the power supply is PXI, is already providing a programming interface!)

    3. check if the LV API (so-called "instrument driver") is available for the device. In the case of a PXI system, get you a device driver (for example NI DCPower).

    4. check if the LV samples are available (for example in the Finder for example LV once you have installed the driver).

    Norbert

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

    I've created a DLL in LabWindows with a function and structure.  I want to call the function from LabView and then access the overall structure.  I am able to call the function in the DLL with a "call library function node" and has access to the return value, but I can't understand how to access the overall structure.  The structure is declared in the header DLL with __declspec (dllimport) struct parameters file.

    Is it possible to access this structure without using the library of network variables?

    My guess is that you need two bytes of padding after "in_out" and another to two bytes of padding after "anin."  The reason being that ints are 4 bytes, and most of them C compilers will align on 4-byte boundaries.  The struct will naturally start to such a limit (in fact, in Windows, it will probably start to an 8 byte boundary).  If you then count bytes in your structure, you are 70 byte after "in_out."  70 is not divisible by 4, so you need 2 bytes more to reach the next 4 byte boundary.  You can also you could reorganize your struct so that "anin" follows "in_out" and this is probably the best option if it won't cause you other problems.

    Unlike most C compilers, LabVIEW compressed structures as closely as possible, without filling.  I don't know enough about the history of LabVIEW and internal parts to explain the reasons and to do this performance penalty, but, as choice of LabVIEW "endianness", it is probably a remnant of the first versions of LabVIEW that were running on the Mac.

    If for some reason you want to force your C struct to match package LabVIEW, you can use the #pragma pack (x) directive, but I wouldn't recommend that here because you can control the C and LabVIEW.

    EDIT: in the cases where it was not clear, add padding to your cluster of LabVIEW, insert appropriate size or items at the place desired in the cluster.

  • The compilation gets error 7 and return all my strings

    Hi, I'm updating of legacy code. It contains references to the paths that don't exist any more (mainly drives on the network).

    So I go through the program, and I Exchange each defective path (from the old M:\ or P:\ to the my laptop C:\).

    When I run the labview program, it works very well.

    However, when I compile the program restores the old paths and gives error 7 when I run the *.exe.

    The paths are strings in text boxes (controls).

    I tried to check the "include files as library" option in the build specification.

    Any ideas? IM using Labview 2012 and the original program comes from an earlier version.

    Hey,.

    you set the values in the default controls or just change the values?

    So just changed, mark the new default values with a right-click on the control-> data operations-> default font of the current value

    Kind regards

    CMW

  • How to transfer data from a DLL Delphi pascal class to a LabView data cluster?

    Hi all

    I have the following problem:

    I use a dll written in Delphi Pascal to transfer data to LabView by using the "Call library function node".

    My Delphi dll contains this class:

    TFlash = class
    Fi: TFileInfo;
    constructor Create;
    procedure LoadFi (Filedir_and_nametring);
    end;

    TFileInfo = record
    IDX:smallint;
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    I created the record datastructure of TFileInfo in a cluster of LabView to have the 'same' variable.

    My plan was to call a DLL Deplhi function with the "call library function node" and pass the address of the folder TFileInfo, so the data would be transmitted to the cluster of LabView.

    When I do a simple delphi dll function as this works because I only spend a small integer to Labview (without reference to the data structure):

    ...

    var data: TFlash;

    ...

    function GetNrOfRows(FilePath:_string):integer; STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath); This function returns the number of lines in the selected file.
    Result: = Data.Fi.Idx;
    end;

    When I try to use this procedure instead of the above function, in order to pass the address of the data set structure complex 'Data' (TFileInfo), I am unable to get the information of 'Data' in my Labview cluster:

    procedure LoadFileInfo (FilePath: string;) DataPointer: Pointer); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath);
    DataPointer:=@Data;
    end;

    Parameters of call library function node:

    -stdcall (WINAPI)

    -Run in the UI Thread

    -Function prototype: void LoadFileInfo (PStr FilePath, void * DataPointer);

    * DataPointer--> Type: "adapt the type" and the format of the data: "pointers to the sleeves.

    * FilePath--> Type: 'string', format of the string: "pascal string pointer.

    I'm struggeling with this problem for almost a week now and I can't really find a solution on the forum or google.

    I also read the following posts:

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=229930&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=77947&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=51245&requireLogin=false

    (or did I miss something in these messages?)

    Hope my explanation is clear.

    THX

    A little further:

    Seems like it's not possible to pass data from Delphi to Labview through a DLL when I create a cluster with 2 bays in it in Labview.

    This part of Delphi, I've had to make in Labview:

    TFileInfo = record
    IDX:smallint; {integer; Convert tool}
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    Instead of using 1 cluster with all the different data in it, I did a unit (1) with my 2 items (smallint and word).

    To pass my data in my tables from delphi to labview, I created another group (2) in the unit (1) with 5 elements of longint (because my delphi is going to 0.4) and another group (3) in the unit (1) with 5 Word elements.

    Right-click on the unit (1) and the clusterorder in the right order. First the smallint, then the longint table, then the word and the Word table.

    When I then use this code in my dll Delphi, IT WORKS! :

    procedure LoadFileInfo (FilePath: string;) DataPointer: PtrTFileInfo); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (Copy (FilePath, 2, length (FilePath)-1));         --> I need to cut the first part of the pascal string because it's length, and I only need the string itself
    DataPointer ^: = Data .fi;       --> pass the record structure to the cluster of Labview
    end;

    Thanks for the info Ralf!

  • How to read strings from a file data?

    Hello

    I have a little. CSV files, which were inside the trees channels (load force, opening force, distance) captured from both engines.

    I want to load multiple CSV files and analyze only two strings (opening force and distance of travel) and send them to a report (go the distance on the x-axis and opening force to the y-axis), but in this report as all channels of all CSV files I have loaded. (make a multiple load)

    My question is how can I read csv files the channels I'm interested and then analyze?

    I use this example to HELP to load the data:

    Dim MyFileNames, iCount
    Call FileNameGet ("ANY", "FileRead", "D:\BOF-MIU\BOF Dim", "data CSV (*.)") "CSV), *.csv", "All.lst", True, "data selection".
    MyFileNames = Split (FileDlgFileName, "|")
    ICount = 0 to Ubound (MyFileNames)
    Call DataFileLoad (MyFileNames (iCount))
    Next

    "and then I try to analyze, but I don't know how to divide the csv file to get only the channels I want."

    Call ChnSmooth ("filedlgfile &" [1] / axis 1: Position (uu) "," / smoothed ', 12, "maxNumber" "...) Y, E, SmoothWidth, SmoothType

    Thank you for your time.

    HI Maria,

    Here is the approach to file dialog you asked--use it instead of the "FilePaths = GetNaviSelFiles()' in the command script I sent you:

    DlgTitle = "insert a file dialog title here...". »

    StartPath = ProgramDrv & "Libr\Dat\".

    FileExts = ' *.» DAT; *. TDM.

    Call FileNameGet ("All", "FileRead", StartPath, FileExts, "No", True, DlgTitle)

    FilePaths = Split ("|" & FileDlgFileName, "|")

    The trick in the TDR file I sent you was set up for mode "exanding" in the "Page layout settings" dialog box  It is an old display option that can cause problems if used in bad situations, but it seemed that it would make your life easier for this particular task.

    Brad Turpin
    Tiara Product Support Engineer

    National Instruments

  • Need help to make the adjustments to TCP between Labview 2011 and webrelay

    Hello

    I'm using Labview 2011 and trying to establish communication with webrelay (X-WR-4R1-l) to control its relay.

    I downloaded a www.ni.com example but it does not work.  (he was tied with this thread as well)

    I did no changes in the example program, that I do not really understand much codes XML.

    I turned ON all 4 relays this webrelay, but in labview, it reads that the relays are turned OFF.

    and when I click the button on the front panel, it does nothing.

    There are several toolkits labview installed in my PC, namely:

    -labview development system

    -application builder

    -recording of data and control module

    -Database connectivity kit

    -internet Toolbox

    -report generation toolkit for Microsoft office

    I'd appreciate it if someone could guide me in this configuration process.

    Thank you

    OK, we're making progress...

    Something seems truncated. Is there something after realy4state in the received string? Because the string is longer, you will need to adjust the number of bytes read. It's more than the 157, which corresponds to the current setting.

    In all cases, their example LabVIEW is a unique feature of relay. You need to look at section 3.2 of the manual that you set for the correct orders. Now there is always a number between 'relay' and 'State' for example:

    1State = 1 for relay activate relay 1.

    You must do two things:

    Write a trainer who composed the correct channels based on the selected relay.

    Write a parser that retrieves the status of all four relays relay. (the offsets will be different, for example)

    I recommend you to treat the four relays as an array of four Boolean values.

  • LabVIEW library 1-d array of string function call

    Help ~!

    Hello the LabVIEW developers and experts ~ ~ ~

    I want to do below.

    1. There is a vi, including 1 string D of the control panel and light.

      

    2. make this dll with Build Specification - Shared Library (DLL) vi.

    definition of function in the header file is below.

    --> Dbl1d_array void __cdecl (LStrHandleArray * inStr1d, LStrHandleArray * outStr1d);

    definition of LStrHandleArray is

    typedef struct {int32_t dimSize;}

    LStrHandle String [1];
    } LStrHandleArrayBase;
    typedef LStrHandleArrayBase * LStrHandleArray;

    3. you want to use this dll in new vi.

    • call the library feature - configure... - Select the file created above dll and function name parameter:

         

    --> Setting tab

      

    ??? What type and what format should I choose to LStrHandleArray * inStr1d in the header file for dll?

    Help ~!

    Thank you.

    The parameters are strings of paintings of LabVIEW. If you simply create an item of this type on the diagram, it wire to the parameter according to configured as Adapt to the Type. But do not use the data in the table

    pointer, but rather a pointer to table manage.

  • import excel data to labVIEW, filtering and exporting to Excel

    LabVIEW dear specialists,

    I have about 2500 data each for acceleration and force stored in two excel columns of the worksheet as well as time data in another column. My problem is to purify my data of noise so I could generate thin sinusoidal signals for my thesis. I'm still new to labVIEW and I would like to ask for help to import my data from labVIEW, filter and exporting to Excel. Please help me. I enclose my data below. Thank you very much.

    froebaruch

    Hello!

    These could be good starting points:

    http://www.NI.com/analysis/Excel.htm

    https://decibel.NI.com/content/docs/doc-8226

    A few examples delivered with Labview, too.

    Kind regards

    Marco

Maybe you are looking for

  • No internal speaker sound on Pavilion dv7

    Since this morning I have no sound from the internal speakers of HP Pavilion dv7 Notebook. Connect headphones and speakers, both internal and external and headphones. Check all the settings and the Device Manager - o.k. all running Windows 7.

  • battery drains more than 50% of the overnight just in mode 'sleep'

    I got the macbook pro retina display since Dec. 4... so its been 17 days only.  I woke up this morning to find my laptop battery to 33 percent, after going to sleep with him to 87% in mode 'sleep'.  I did some research and that you turn off bluetooth

  • mouse scroll broken?

    I must have inadvertently done something change that stopped my mouse to scroll. Even on this site, I can't scroll through this area of the body by scrolling the mouse wheel. For some reason, suddenly I need to drag the scroll bar on the right side o

  • Missing installation of Windows XP Pro Media Center Edition 2 disc

    I had problems with my laptop and decided to reformat the hard drive and reinstall Windows.  I discovered during the installation that I need a disc 2 for a complete installation.  Since the operating system is installed on my laptop, I was not aware

  • CS5 Master Collection and the need to transfer the license for sale

    Okay, quick question about this because I want to make sure that the buyer knows what to expect.  I have posted this at the end of a similar thread but noticed that it is marked answered so I guess that's not an answer.  I will sell my CS5 Master pas