from struct with table of dll

I have a dll with a function similar to the following, I have to call.

16th #define CHIEF

typedef UINT32 status;

typedef UINT32 DeviceHandle;

typedef struct SetRcvFilterReq
{
UINT16 mask [COUNT];
} T_SetRcvFilterReq;

typedef struct RcvFilterResp
{
Status of UINT16;

} T_RcvFilterResp;

API status API_CALL SetRcvFilter(DeviceHandle handle, T_SetRcvFilterReq rcvFilter, T_RcvFilterResp *response);

I tried to manage it as it is descripbed in the Simple Struct "(with types of basic data); Passage of a parameter (passing by value)"I found here:

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

But it does not work to my problem. I still have the error 1097.

Any ideas?

Tobias_BSH wrote:

Hi nathand!

My problem is exactly the way I need to counfigure the COLD LAKE! The struct is passed by value, not by reference and it contains a table, so I don't know if I did it right. If I try to use a table or a cluster, the COLD LAKE alwas want to pass the reference value.

Yes, I Traore error maximum control level and the COLD LAKE error 1097: "LabVIEW: an exception occurred in the external code that is called by a function of the call library node." The exception may have damaged the memory of LabVIEW. Save all work to a new location and restart LabVIEW. »

It would be a fairly portable Setup. Passage of a struct by value means that all its individual components are passed on the stack. However, for an array of uint16, it raises the question if each uint16 is passed as a single parameter value or rather two uint16 combined in a setting from 32-bit to 32-bit LabVIEW and four uint16 combined into a 64-bit to 64-bit LabVIEW parameter. I would like to personallly assumes that it's the last. However, I'm not sure C actually mandates one above the other and it is quite possible that different C compilers do it differently (and some might even choose to promote to a pointer in any case!

In short, standard C is quite vague in these things and leaves flexibility to the developers of the compiler for specific implementations. This isn't a defect of C, but on purpose to allow C compiler to the manufacturers to adapt their compiler in various ways to the real implementation that is best suited to a particular architecture of the CPU hardware. C is not even mandate that one byte is always 8 bits (and for some examples of hardware architecture arcane that it wasn't!)

Personally, this API is something that although it can probably be made to work by the elements of the array of packaging in the elements for the target architecture and then pass them as parameters, individual service, is certainly something that I would trust never to be consistent between different C compilers (and same versions of C compiler).

So try to create 8 16 uint16 values uint32 values and pass them as 8 individual function parameters (4 uint64 settings if you get to work in 64-bit LabVIEW). It can work, but is a horrible definition of the API.

Tags: NI Software

Similar Questions

  • Export data from the database Table in the CSV file with OWB mapping

    Hello

    is it possible to export data from a database table in a CSV with an owb mapping. I think that it should be possible, but I didn't yet. Then someone can give me some tips how to handle this? Someone has a good article on the internet or a book where such a problem is described.

    Thank you

    Greetings Daniel

    Hi Daniel,.

    But how do I set the variable data file names in the mapping?

    Look at this article on blog OWB
    http://blogs.Oracle.com/warehousebuilder/2007/07/dynamically_generating_target.html

    Kind regards
    Oleg

  • Search page based on query with Table on Layershift ADF Panel does not work correctly

    Hello

    I'm on 11.1.2.4 jdev and deployed my application on glassfish 3.1.2. I've hosted this application on Layershift externally.

    I created a search page based on query ADF with table Panel. All fields of research are working fine on weblogic Server integrated and my deployment local glassfish.

    However, on Layershift, when I enter some criteria of research in certain fields, it does not record.

    UPDATE, it seems that the problem is with the fields which are of the "String" ie. Name. Fields of data type Integer and Date seems fine.

    any ideas please?

    Thank you

    kdario, you're right, ViewCriteria does not use the correct syntax for mysql for the concatenation.

    The generated sql statement looks like this.

    SELECT * FROM (select student_id, student_name, from  student) QRSLT WHERE ( ( (UPPER(student_name) LIKE UPPER('%' || 'Per' || '%') ) ) )
    

    as DB MySql does not support | (double pipe sign), its sql causing failure.

    in order to support |, mysql requires to change the sql mode setting in the file my.cnf (on linux) in the

    # Set the SQL mode to strict
    sql-mode="PIPES_AS_CONCAT,STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
    

    After setting this parameter, its working fine now.

  • To find common data in 2 columns from two different tables.

    Hello

    Could someone help me with a querry to discover common data of 2 columns from two different tables?

    Thank you
    Rajesh

    Try as below.

    select col1 ,col2 from tab1
    intersect
    select col1 ,col2 from tab2;
    
  • Refresh the Materialized View constructed from an external table commit?

    Is it possible to create a materialized with Refresh view on commit built from an external table?

    I think the answer is "no, because there is no way for the outer table report to the view materialized it has been changed," but I would like to be sure before I tell my client who has requested the opportunity to do this (or, Alternatively, to learn how Oracle hoops I have to cross in order to operate).

    I can create a Refresh on demand, it is not a question of not having the necessary permissions to create the materialized view itself.

    No, you can't. The outer table is not modified in a transactional way and there no materialized view logs, so there is no event to hang in and no delta to apply.

    However, you can use dbms_scheduler observer file that will ask for the presence of a file and load the data in a table or refresh a materialized view based on the external table.

    Justin

  • Rows from the outer Table shows only not all data.

    Hello

    I have a line to 80 characters that I import in an external table.

    80% imports fine line data, but some lines are cut.

    The bytes in the file are as follows.
    ABCABC2334 0000001000010000001000000001 000000 00001C A002

    Bytes in an external table.
    ABCABC2334 0000001000010000001000000001 000000 A002

    The bytes in the row of the outer table stop somewhere at the end of 000000 and the 00001C is cut.

    What build be the cause of this?

    I am able to read the characters at the beginning and towards the end of the record of 80-character line.

    The external file below performs the following operations.
    ABCABC2334 0000001000010000001000000001 000000 01B A002

    I can even make a definition of the external table (c1 char (1), c2 char (1),... c80 (1) tank and all the characters see fine in the specified columns.)

    Here is the last definition of the external table. The "middle" column still shows this behavior. Basically, it is in the file and can be seen with every character in the definined line, but not as a group of characters.

    DB CHARACTERSET WEBISO8859P1

    CREATE TABLE EXT_PROJ_1
    (
    Field1 tank (6 BYTES),
    Field2 float (4 BYTES),
    medium (67 BYTES)
    field3 tank (3 bytes),
    CR tank (2 bytes)
    )
    EXTERNAL ORGANIZATION
    (TYPE ORACLE_LOADER
    THE DEFAULT DIRECTORY EXP_DIR
    ACCESS SETTINGS
    (
    RECORDS delimited by '\r\n '.
    FIELDS (field1, position(1:6),
    position(7:10) Field2.
    average position(11:77)
    field3 position(78:80).
    CR position(81:82)
    )
    )
    LOCATION (EXP_DIR: 'ext_proj_1.txt')
    )
    REJECT THE LIMIT 1
    noPARALLEL
    NOMONITORING;

    Published by: 917320 on March 13, 2012 09:07

    Looking at your table definition:

    field1 char(6 BYTE),
    field2 char(4 BYTE),
    middle char(67 BYTE),
    field3 char(3 byte),
    cr char(2 byte)
    

    column in which you will store a string of 80 bytes?

    BTW: You said "import into an external table." You import FROM an external table or EXPORT to an external table?

  • join an associative array with table

    I'm new to associative arrays.

    Here, I'm doing the equivalent of as follows:
     create table mytable as select n1,padding from T1 where rownum <=5;
    Table created.
    And join this table with T1 and the corresponding records to get top 10
      1   SELECT * FROM
      2   (
      3     SELECT
      4              T1.n1
      5            , T1.small_vc
      6            , mytable.padding
      7      FROM
      8             mytable
      9            , T1
     10      WHERE
     11            mytable.n1 = T1.n1
     12   )
     13* WHERE ROWNUM <= 10;
    Now with the assicative bays
      1  DECLARE
      2          type array is table of T1%rowtype index by binary_integer;
      3          l_data array;
      4          l_rec T1%rowtype;
      5  BEGIN
      6          SELECT
      7                    *
      8          BULK COLLECT INTO
      9          l_data
     10          FROM T1
     11          WHERE ROWNUM <=5;   -- the top 5 records
     12          FOR i IN 1..l_data.count
     13          LOOP
     14                BEGIN
     15  --
     16               SELECT
     17                     *
     18               INTO
     19                     l_rec
     20               FROM
     21                     T1
     22               WHERE
     23                     T1.n1 = l_data(i).n1;
     24             EXCEPTION
     25               WHEN OTHERS THEN
     26                       DBMS_OUTPUT.PUT_LINE(to_char(SQLCODE) || ' - ' || substr(SQLERRM,1,200));
     27        END;
     28     END LOOP;
     29* END;
    [email protected]> /
    -1422 - ORA-01422: exact fetch returns more than requested number of rows
    -1422 - ORA-01422: exact fetch returns more than requested number of rows
    -1422 - ORA-01422: exact fetch returns more than requested number of rows
    -1422 - ORA-01422: exact fetch returns more than requested number of rows
    -1422 - ORA-01422: exact fetch returns more than requested number of rows
    Of course the encoding isn't fair. Also, I want to display the first 10 results set.

    Thank you

    Mich

    Talebzadeh mich wrote:

    Does it fast enough and I think it is necessary for using the pipeline to multiple joins functions to update the tables of FACTS so to speak.

    A pipeline returns data that are not indexed. So by default, using data from a pipeline function involves a full production table scan. That's why native SQL tables are better than a pipeline - as these are accessible and used optimally (via the index partitions, bitmaps, clusters, etc.).

    Since PTFS uses memory structures as associative arrays do, what are the main benefits of using TFP compared to the associative arrays in addition to the fact that in MFP memory structures are presented in the SQL format?

    Not the same structure. An associative array is typically a list linked and "indexed" differently.

    A normal array is accessible by compensation. Let's say it's an array of bytes 4 IEEE floats. 1st entry is at position 0 in the structure of memory. The 2nd entry at position 4. Etc.

    Index number of the table is used to determine the offset of this table cell in the structure of memory.

    An associative array is "indexed" using strings or dates or numbers (not sequential). Thus a structure like a linked list must be used. Access to the range means a search in this linked to the match index list and then read the value of this cell in the table.

    The associative arrays do exist in the SQL engine. It is a unique data structure of PL/SQL engine.

    As to the benefits of a pipeline - this is when the data must be processed and plain vanilla SQL is not able to do this and PL/SQL is required.

    Simple example. A flat web service XML data structure. A table of pipeline can use UTL_HTTP to make the service web call, retrieve the XML code and that the output data as rows and columns - in effect turning a web service interface into something that looks like a SQL table and can be used as if it were a table SQL.

    Reading Tom on the use of pipelines comments:
    http://asktom.Oracle.com/pls/asktom/f?p=100:11:2814739467100916:P11_QUESTION_ID:19481671347143

    Also when can I use associative arrays functions insteard table in pipeline?

    Associative arrays are useful for the only PL/SQL data. For example, which deals with the pair name / value that are placed by a customer and that are used to determine which query or process data. For the majority of the PL/SQL code and the treatment, associative arrays are not necessary. And often wrongly used that developers do not seem to understand what an associative array is and how it differs from a normal table structure.

  • XML from the Oracle Table data

    Hi all

    I'm new to this network. I'm also new to oracle XML package. I want a help with the query below.

    CREATE TABLE EMP (ID NUMBER PRIMARY KEY, NAME VARCHAR2 (10), TELEPHONE NUMBER);

    INSERT INTO EMP (ID, NAME, PHONE) VALUES (11, 'Joy', 1234);
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (22, 'Mike', 5678).
    INSERT INTO EMP (ID, NAME, PHONE) VALUES (33, "Jason", NULL);
    COMMIT;

    I want to export data from the EMP table in an XML file with the format below.

    Power required:

    <? XML version = "1.0" encoding = "UTF-8"? > < Joy STATICDATA > < EMP > < ID > 11 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Mike STATICDATA > < EMP > < ID > 22 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? > < Jason STATICDATA > < EMP > < ID > 33 < /ID > < NAME > < / NAME > < / EMP > < / STATICDATA >

    I used some XML functions and you wrote the following query.

    Select XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8') xml EMP;

    my query output:

    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 11 / < ID >
    Joy of < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 22 / < ID >
    < NAME > Mike < / NAME >
    < / EMP >
    < / STATICDATA >
    <? XML version = "1.0" encoding = "UTF-8"? >
    < STATICDATA >
    < EMP >
    < ID > 33 / < ID >
    Jason < NAME > < / NAME >
    < / EMP >
    < / STATICDATA >


    But I want the out as the power required above. all records in a single line. can someone help me achieve the desired output. also can I export all columns of the table with something like select * from the table in the XML file?

    Thank you
    Delobelle

    Don't know why you need it on a single line, but you could:

    Select XMLTYPE (REGEXP_REPLACE (XMLROOT (XMLELEMENT (staticdata, XMLELEMENT (EMP, XMLELEMENT(ID,ID), XMLELEMENT(NAME,NAME))), version "1.0" encoding = "UTF - 8'), CHR (10) |)) ' *<><'))>
    FROM EMP;

    SY.

  • Select values from the db1 table and insert into the DB2 table

    Hello

    I have three databases oracle running in three different machines. their ip address is different. among the DB can access databases. (means am able to select values and insert values into tables individually.)

    I need to extract data from the DB1 table (ip say DB1 is 10.10.10.10 and the user is DB1user and the table is DB1user_table) and insert the values into DB2 table (say ip DB2 is 11.11.11.11 and the user is DB2user and table DB2user_table) of DB3 that is to have access to the two IPs DB.

    How do I do this

    Edited by: Aemunathan on February 10, 2010 23:12

    Depending on the amount of data must be moved between DB1 and DB2, and the frequency at which this should happen, you might consider the SQL * COPY more control. I think it's very useful for one-off tasks little, so I can live within its limits of the data type. More http://download.oracle.com/docs/cd/E11882_01/server.112/e10823/apb.htm#i641251.

    Change some parameter of sqlplus session are almost mandatory in order to get decent transfer rates. Tuning ARRAYSIZE and COPYCOMMIT can make a huge difference in flow. LONG change may be necessary, too, depending on your data. The documentation offers these notes on use:

    To activate the copy of data between Oracle and databases non-Oracle, NUMBER of columns is replaced by DECIMAL columns in the destination table. Therefore, if you are copying between Oracle databases, a NUMBER column with no precision will become a DECIMAL column (38). When copying between Oracle databases, you must use SQL commands (CREATE TABLE AS and INSERTION), or you must make sure that your columns have a specified precision.

    SQL * the VALUE LONGER variable limits the length of the LONG column you are copying. If all LONG columns contain data exceeds the value of LONG, COPY truncates the data.

    SQL * Plus performs a validation at the end of each successful COPY. If you set the SQL * variable more COPYCOMMIT DEFINED to a value positive n, SQL * Plus performs a validation after copying all lots n of records. The SQL * Plus ARRAYSIZE variable SET determines the size of a batch.

    Some operating environments require that the service names be placed between double quotes.

    From a SQL * Plus term on DB3, can resemble the command to move all content from my_table in DB1 to the same table in DB2

    COPY from user1/pass1@DB1 to user2/pass2@DB2 -
    INSERT INTO my_table -
    USING select * from my_table
    

    Note the SQL code * more line-continuation character ' - '. It is used to escape the newline character in a SQL * Plus command if you do not have to type all on one line. I use it all the time with this command, but I can't locate the documentation on that right now. Maybe someone else can put their finger on it.

    There are other ways to accomplish what the command copy and it is not without its quirks and limitations, but I find that there is usefulness in an Oracle Toolbox.

  • Got a 27 "monitor from Apple, with thunderbolt (error). My MacPro can't love at first sight. Apple won't bring back the monitor. Will using a USB 3 map and then using a hard drive with USB 3 and Thunderbolt works?

    Got a 27 "monitor from Apple, with thunderbolt (error). My MacPro can't love at first sight. Apple won't bring back the monitor. Will using a USB 3 map and then using a hard drive with USB 3 and Thunderbolt works?

    N ° you need a computer logic board which has built in Thunderbolt.

  • I downloaded Multi Access Tool from Mcafee with Firefox Mozilla, how do I reinstall if it does not work properly?

    I downloaded Multi Access Tool from Mcafee with Firefox Mozilla, how do I reinstall if it does not work properly?

    My sincere apologies, my Mcafee came via the Optimum/Cablevision, not Mozilla. I now managed to solve my problem and appreciate the 2 above responses. Thank you.

  • Since Fx32, show Cookies always reveals no. stored COOKIES. Where are they? I have 'accept cookies from visited' with a large list of exceptions of blocked sites.

    I have "Always deprived of the use of navigation" and "Accept the Cookies from Sites" with "Third Party Cookies: to visit ' but with a long list of site Exceptions, I intend to block." Since Fx32, DISPLAY COOKIES still says there is nothing to show. I understand the incognito automatically deletes history (including cookies) on Fx is closed, but after some extensive navigation, I expect to see some session cookies only from sites that is: a) are listed ALLOW/SESSION on my Exceptions list; or (b) are not exceptions listed at all. The list of exceptions has two categories: Ad Server sites I block to avoid hearing; and ALLOW the sites I visit have warn me to allow their cookies. Even after the connection to these sites (connection requires their cookie) DISPLAY COOKIES always says that there is not.

    1 I'm wrong about PRIVATE BROWSING, it does not control the placement of the cookie, which leaves to ACCEPT the COOKIES and the parameters of the Exception, but erases them cookies and another story when Fx closes?
    2. so where's my cookies I know work when I login, for example, my mail server or Amazon?
    3-do I need to install the addon from SQLite-Manager to see the cookies .sql file? It will work with Fx32 +?

    Thanks for the input, cor - el. Once I realized where is the console command line and exceeded his SPAM warning, cookie.split () / join () worked very well: a lot of output, especially warnings of javascript and HTTP requests, at least a cookie. But then I wondered:

    I pressed accidentally on [CLEAR] and console obeyed, of course. So I enter again the command (several times) but now get no reply - msg just empty console pane. Close the current tab from fx, then open a new web console, connect and I reinterpret the split () / join (). Now console only statements interprets this command error msg: > undefined (attached screenshot).

    So my question: can this js command split () / join () consider only once? I have to adjust something first? It seems the PRIVATE BROWSING feature design "drape" of all the cookies I allowed to-I assume to keep them from being seen, that's it? So can a Web page script place a cookie, and then later in the same session back or questioning? A page can simply include a document.cookie.split()/join () command in the script?

    In any case, I'm happy to have your technique and grateful. Thank you. I'll try it as a bookmark shortly.

  • When your latest and greatest version will be compatible with table 9.1?

    The only version of Firefox that is currently compatible with table 9.1 is Firefox 3.6

    It is up to the Blackboard to catch up with versions of Firefox.

    Google Chrome and Mozilla Firefox are passed to a quick release cycle. At the time of the breathalyzer test, 13.0 Chrome and Firefox 6.0 were the latest available versions. After the war, since new stable releases may have been released and widely adopted. Blackboard supports all new stable versions of Chrome and Firefox.

  • Can I use the old bluetooth keyboard from Apple with the new iPad from Apple pro?

    Can I use my old bluetooth keyboard from Apple with the new iPad from Apple pro?

    When I asked the same question on the Apple Store, they said yes. You need to try to be sure.

  • I can't find the bookmarks organize and/or export bookmarks from Safari with Firefox 4

    I can't find the bookmarks organize and/or export bookmarks from Safari with Firefox 4. View that all bookmarks does not help.

    Among the small icons - rightmost - in "show all bookmarks" is an import-export. Place your cursor on them and it will say what it is.

Maybe you are looking for