How to call a DLL function that has need of an array initialized structures which can be written in by the DLL?

I need to call the following function in a C DLL:

__declspec (dllexport) int MSIL_EnumSpectrometers (SPECTROMETER_ID * spectrometers);

where the only parameter is a pointer to:

typedef struct
{
tank model [32];
series char [32];
Channel int;
} SPECTROMETER_ID;

Before LabVIEW 2011 I would use a CIN allocate the memory and call the function, but in LabVIEW 2011, the INC has been deleted and I have to use a library function node call instead. When I go to set the parameter, it seems that I need to set the type to "Adapt to the Type" and data for 'Pointer to data in table' Format, then pass an initialized array of SPECTROMETER_ID with the many elements he so the DLL can fill the table with data. (See the attached picture.) When I do that, however, it blocks LabVIEW desktop.  I guess it is because the DLL is corrupting the memory space of LabVIEW, but I don't see why, because I'm basically passing in a void pointer to an array initialized in the right size. Note that the first node of NSI returns the number of elements required in the table.  Anyone have any idea what I'm doing wrong here?

In LabVIEW, when a table is in a cluster - cluster don't detain actually table but sort of a pointer that points to the table. If you need the cluster to contain 32 to 32 Add to the cluster. See the VI attached to how it's supposed to be done.

Tags: NI Software

Similar Questions

  • How can I make sure that my models not resident on a host which can enter mode standby when the DPM is activated?

    I have a host in my cluster I have designated as the place where I would like my vCenter server to reside.  I created a rule of affinity for that to happen.  I would like to have my models are on the same host. However, I don't see a way to do this with affinity rules as templates are not displayed in the list of virtual machines that can be chosen to create a group.  I guess that ther eis a way to do it.

    To ensure that guests with templates is not extinguished by DPM, you must override the DPM settings for this host setting DPM to disabled.

    André

  • How to fix iPhone 6 Plus that has had water damage.

    How to fix iPhone 6 Plus that has had water damage.

    By Apple

    If you have Applecare and have identical one lives left, a replacement iPhone franchise according to your country

    If not, the price of a new iPhone, there is no repair for a water damaged phone

  • How do you get a message that has been marked "do not show this message again" to reappear?

    How do you get a message that has been marked "do not show this message again" to reappear?

    Preferences > General > reset all warnings.

  • How to export data to excel that has 2 tables with the same number of columns and the column names?

    Hi everyone, yet once landed upward with a problem.

    After trying many things to myself, finally decided to post here...

    I created a form in form builder 6i in which clicking on a button, the data gets exported to the excel sheet.

    It works very well with a single table. The problem now is that I cannot do the same with 2 tables.

    Because the tables have the same number of columns and the columns names.

    Here are the 2 tables with column names:

    Table-1 (MONTHLY_PART_1) Table-2 (MONTHLY_PART_2)
    SL_NOSL_NO
    MODELMODEL
    END_DATEEND_DATE
    U-1U-1
    U-2U-2
    U-4U-4
    ..................
    ..................
    U-20U-20
    U-25U-25

    Given that the tables have the same column names, I get the following error :

    402 error at line 103, column 4

    required aliases in the SELECT list of the slider to avoid duplicate column names.

    So how to export data to excel that has 2 tables with the same number of columns and the column names?

    Should I paste the code? Should I publish this query in 'SQL and PL/SQL ' Forum?

    Help me with this please.

    Thank you.

    Wait a second... is this a kind of House of partitioning? Shouldn't it is a union of two tables instead a join?

    see you soon

  • How to remove a discoverer report that has a status of running query

    Hello

    How to remove a discoverer report that has a status of running query

    Thank you

    Hi 925907,

    I think you would work with your DBA to kill the session associated with the workbook running.

    A query like this will provide your DBA with all the necessary information, it must:

    Select
    vs.*
    Of
    v$ session vs
    where
    vs. Program like 'dis51ws@% ';

    After the session was killed, it is a deletion of standard workbook (select file > open workbooks, and then right click on the name of the workbook, and then select delete).

    Patrick

  • How to remove a video file that has been downloaded through Realplayer FLV type

    I down loaded a video file over the internet through Realplayer.  However when I tried to delete the file folder, the window has stopped working and closed itself. so I can't do anthing on the file.  Please let me know how to do.

    It seems your windows explore crashes when you open the file, you can follow these steps to delete the file in this folder... using the command promt.

    (1) open the command prompt. (Click the Startbutton .) In the search box, type command, and then prompt in the list of results, double-click command prompt. )

    2) navigate to the download folder where the flv file is present, using the "cd" command.

    For example, if your file is present in the "C:\Users\user1\Downloads".

    Type cd C:\Users\user1\Downloads and press enter in the command prompt.

    (3) Delete (Remove) the file name using the "del" command.

    For example, if your flv file name is "sample.flv.

    Led sample.flv type and press enter in the command prompt.

    I hope this works for you :)

  • My acrobat 8 is recorded for a computer that has been hacked and is fried, but I can't reg to this computer and now I cannot use it for 30 days on this computer

    My acrobat 8 is recorded for a computer that has been hacked and is fried, but I can't reg to this computer and now I cannot use it for 30 days on this computer

    Serial number and activation support (no-Cloud) https://forums.adobe.com/thread/2041990 to adjust the number of activations

  • When I updated the shock of the clans for my daughter on his iPad, it has its own apple ID. and iCloud, my ID apple came on his id for the update, where it has its own apple ID now. Please can someone tell me why the update came not through its id.

    When I updated the shock of the clans for my daughter on his iPad, it has its own apple ID. and iCloud, my ID apple came on his id for the update, where it has its own apple ID now. Please can someone tell me why the update came not through its ID thanks

    It seems that if the application has been downloaded on his iPad while it is connected to your Apple ID. If so, he'll always want to be updated with your Apple ID.

    You must remove the application from his iPad and then download it again while it is connected to its own code of Apple.

  • I get the message when I opened the Muse CC, that the latest version is here and that I need to download... But when I click on "Download the latest Version" and need me to request manager it say that Muse is "up-to-date"... I also download

    I get the message when I opened the Muse CC, that the latest version is here and that I need to download... But when I click on "Download the latest Version" and need me to request manager it say that Muse is "up-to-date"... I also downloaded a model Muse and it says when I open it I also need the latest version... Can someone explain why Iam getting this message and why I can't update?... Very appreciated

    Download the desktop app creative cloud using the link below: -.

    Download Adobe Creative cloud apps | Free trial of Adobe CC

    Then check if you install button for Muse CC 2014.3

    Kind regards

    Neha

  • How to call a dll from another dll functions

    Hi, can someone please tell me some examples or instructions on how you go about calling functions from a dll from another dll including the IUR. The two DLLs were created with labwindows cvi.

    Thank you!

    Hi Sinnas,

    You mention that you use a UIR.  A DLL does not have a file UIR as part of it.

    DLL1

    Instead, when you build the DLL first, we'll call it DLL1, you create a header or the files that contain functions that you want to the client code to call.  When you build DLL1, you must export the file DLL1 function for his client to call code header.  Whatever the calling code is (a GUI or another DLL), you must include in the exported DLL1 project headers AND DLL1 .lib file generated when you generate it.

    DLL2

    DLL2 will contain in its project, the header file exported for DLL1, DLL1 .lib file - that gives it the feature in DLL1.  The code can then call any desired DLL1, but as DLL1, you should now have a header file that exports the functions of DLL2 desired HIS client code to call.  When you build DLL2, you create a .lib for THAT DLL file to include in the code of the final customer.

    GUI

    The final customer code will be a few GUI that you create to call DLL2 functions will have the UIR upper layer file.  It will include the exported DLL2 header file and the file .lib DLL2 in his project.  It can then call any function of DLL2.  It is the most clean way to have 2 dll working together.

    NOTE: You can create a GUI to test the lower level DLL1 functions before placing DLL2 in the system.  In fact, it's a good idea to do it - you want to make sure your lower level DLL1 code works properly before construction above it.

    Simple diagram

    Client code (calls to functions of the DLL2 header files) exported

    --------------------------------------------------------------------------

    DLL2 (DLL1 function calls exported in header files)

    --------------------------------------------------------------------------

    DLL1<--------------------  you="" can="" also="" create="" a="" gui="" that="" only="" calls="" dll1="" exported="" header="" files="" to="" test="" out="">

    A suggestion... I create my dll in debug mode and use them to test my code.  But I also build as static libraries.  When I do the final version of the system, I use static libraries.  They are built with the final executable and don't require additional files to install as do the dll.  When you install your system with DLLs, you must include all THE dll and they must be installed in the folder Windows/System32 of the target computer.

    I hope this helps...

    Judy

  • Create a directory tree: how to call a global function from inside a for loop

    Hello

    I am trying to create a workflow that will create a directory tree in vCenter.

    Concept:

    Basically, I am trying to execute nested for loops for each level of the tree to the caller a global tree.

    Problem:

    The 1st loop for works and creates the file 'Dev '.  The second loop for does not work with error message:

    [19:16:16.219 2013-06-27] [I] building Dev folder
    [19:16:16.474 2013-06-27] [I] directory Built: Dev
    [19:16:16.476 2013-06-27] [I] the records building servers
    [19:16:16.480 2013-06-27] [I] TypeError: cannot find the createFolder function in dev object. (Workflow: TEST_TNG_New_Site_Folder_Structure / Scriptable task (item2) #36)

    I think it has to do with JavaScript not being not able to call a global function in a nested object (I'm not a programmer and don't know JavaScript, so don't shoot me on that :)

    Code: (will clean this up once I do work)

    var folderBase is ['Dev', 'DMZ', 'Prod', 'UAT'];.

    var folderT1 = ["servers", "Jobs"];

    var folderT2 = ['Window', 'Linux'];

    var folderT3 is ["Repo2', 'Repo3', 'Repo1', 'Repo4'];.

    var folderT4 is ["T1", "T2", "T3"];.

    Create the files folderBase level

    for (var i = 0, l = folderBase.length; i < l; i ++) {}

    var rootFolder = parentFolder;

    buildFolderTree (folderBase [i]);

    Create the files folderT1 level

    for (var j = 0, l = folderT1.length; j < l; j ++) {}

    var rootFolder = folderBase [i];

    buildFolderTree (folderT1 [j]);

    Create the files folderT2 level

    for (var k = 0, l = folderT2.length; k < l; k ++) {}

    var rootFolder = folderT1 [j];

    buildFolderTree (folderT2 [k]);

    Create the files folderT3 level

    for (var x = 0, l = folderT3.length; x < l; x ++) {}

    var rootFolder = folderT2 [k];

    buildFolderTree (folderT3 [x]);

    Create the files folderT4 level

    for (var y = 0, l = folderT4.length; y < l; y ++) {}

    var rootFolder = folderT3 [x];

    buildFolderTree(folderT4[y]);

    }

    }

    }

    }

    }

    function buildFolderTree (folderName) {}

    System.log ("Building folder" + folderName);

    rootFolder.createFolder (folderName);

    System.log ("directory of frame:" + folderName);

    }

    Any help will be appreciated.

    Thank you

    B

    Hello

    The createFolder() method returns the object VcFolder to the folder just created, for the new file to be used immediately.  Here is how I modified the code:

    Create the files folderBase level
    for (var i = 0; i)
    var newBaseFolder = buildFolderTree (parentFolder, folderBase [i]);
    Create the files folderT1 level
    for (var j = 0; j)
    var newT1Folder = buildFolderTree (newBaseFolder, folderT1 [j]);
    Create the files folderT2 level
    for (var k = 0; k)
    var newT2Folder = buildFolderTree (newT1Folder, folderT2 [k]);
    Create the files folderT3 level
    for (var x = 0; x)
    var newT3Folder = buildFolderTree (newT2Folder, folderT3 [x]);
    Create the files folderT4 level
    for (var y = 0; y)
    var newT4Folder = buildFolderTree (newT3Folder, folderT4 [y]);
    }
    }
    }
    }
    }

    function buildFolderTree (parentFolderObj, folder_name) {}
    System.log ("Building folder" + folderName);
    var newFolder = parentFolderObj.createFolder (folderName);
    System.log ("directory of frame:" + folderName);
    return NewFolder;
    }

  • C# - run a function that has no constuctor - is not possible?

    Hello

    I have a C#-DLL that contains a form with builder class. I can open and run an LV form by using the "Select. NET-Builder ".

    Then I have a second class in the DLL that executes only the form but does not have an own constructor.

    Now here's the problem: I see the name of the class in the 'Select. NET-Builder "-popup but I can't he choose as there is no constructor for this class."

    Question now is: How can I run the functiions in this class?

    THX

    BR

    Try the procedure described in the solution to this issue - http://forums.ni.com/t5/LabVIEW/to-access-function-or-properties-in-sealed-singleton-objects/m-p/234...

    If this does not help let us know and we will try to help.

    Kind regards

    Simon

  • How to call PL/SQL function processRequest

    Hello

    I'm trying to run a function called xxhr_trg_evaluation_pkg.xx_get_class_desc (1);

    How can I run the above inside the processRequest function and pass the value returned in a variable string.

    Thanks in advance

    Kind regards... Ashraf

    Ashraf,

    The following code will help you how to call the function or procedure in processRequest.

    processRequest Code:

    {} public processRequest Sub (pageContext OAPageContext, OAWebBean webBean)

    Oaam = pageContext.getApplicationModule (webBean) OAApplicationModule;
    OADBTransaction dbtrans;
    TXN OADBTransaction = (OADBTransaction) oaam.getOADBTransaction ();

    statement that even execute the statement as pl/sql in Toad
    = Txn.createCallableStatement cs CallableStatement ("start: 1: = xxhr_trg_evaluation_pkg.xx_get_class_desc (: 2); end;", 0);

    variable will contain the return value
    String outputVal ="";

    pass the value of the entry to the callable statement
    try {}
    cs.setString(2,1+"");

    }
    catch (Exception e) {}
    }

    try {}
    CS. Execute();
    outputVal = cs.getString (1);
    }
    catch (Exception e) {}
    }

    try {}
    CS. Close();
    }
    catch (Exception e) {}
    }
    Did all the insert/update/etc means do validation of here too but you did not engage in the service by using the following syntax
    dbtrans.Commit ();

    }

    Thank you
    SAN

  • How do we install start page that has blocks of preference/history on this?

    I try to install the firefox start page that has blocked on that and I'm not. This is the start page with firefox preferences that you can modify. There are 6-8 places at the top and at the bottom of the page with the proposed Web sites...

    If you type or paste Subject: newtab in the address bar and press ENTER, which is the page that you want to? You could type that in the Options page manually or use one of the other methods in these articles to support:

Maybe you are looking for