NO access to certain cells when passing 2D array to DLL

I am trying to feed a 2D array (image reading) to a DLL, but it always gives a 1097 error. I debugged the original C++ code. It narrows down to the point that some pixels cannot be read. So I write a simple C code to reproduce the issue. 
As you can see from the following screenshot, this C code simply returns the number indexed by 'index'. When fed from Labview to the DLL, I chose to feed a 2D array as 'Array Data Pointer'. Then I put it in a for loop to read through the entire array. The returned array showed that the cells after 75th row cannot be read with a 1097 error. But why? What did I do wrong? 

Yes, initialize-array initializes a table of I32, and the type in the CLF matches, but the DLL is still indexing into (what it thinks is) an array of Double - see the function syntax the C source-code: "(double *x",...).
If you simply change the initialize-array type to U64, it will allocate enough space.  It's not even necessary to correct for type conversion - you're still passing a pointer, the DLL will be happy.

Similar Messages

  • Controlling Access to Certain Reports When Using Crystal Reports Server

    Hi,
    I was wondering exactly how security is managed when using Crystal Reports Server?  Do you assign rights to individual reports via user ids in Active Directory?  Or what exactly is used for user authentication?  Is it possible to create local accounts?  Thanks.

    Usually access is controlled by permissions which are set in the CMC (BO web admin tool). You can map 3rd party groups from AD or LDAP and then assign permissions to those groups or set up security with built in enterprise groups as well. You may elect to use any combination of the above. For more complex security models there can use database and row level security built into our meta layers called business views and universes.
    Regards,
    Tim

  • Not enough memory error when passing an array to a chart

    Hello.
    I am trying to pass some data from a reading loop to a display loop using queues and charts.
    In order to save on redraws I am reading the queue just once a while, flush it and pass the resulting array to the Chart. It is actually an array with clusters of three values.
    Everything works fine unitl I actualy want to display the chart. I can pass the data and see it using an indicator without any problems.
    When I wire the data to the chart it randomly shows : "not enough memory to complete this operation"
    The fact is the array being passed to the chart is of random size.
    The queue size is good for about 20 min. Labview shows an error after a few seconds. After clicking ok it prints out the results correctly and then a second or two later same error.
    What am I missing here? Thanks
    LV 2012 f3 I7 2.4GHz 16GB RAM
    Attachments:
    TestChart.vi ‏17 KB

    Not sure if it helps or not but here is the error.
    I put about 200 elements/s in the queue. That is why instead of reading it 200/s I just want it to read it once a while.
    I am not sure what is a bigger burden:copying one 500 elements array twice a second or 200/s and 200 calls to the Queue.
    The max size of the queue is not important here. I can set it to something more reasonable and will get the same error.
    What will happen to my CPU usage if I put the Chart in the for loop and make 500 call to it? And then half a second later another 500 calls?
    As I said at this point I do not know how much history I need or not but all I want is to be able to see a few s of it. If I loose the rest it is ok for now. 
    Lets says that all I care is to see it close to real time with a history of 5s. It would mean the queue buffer size of  1000.
    Back to the main problem: why do I see the memory error  window when I know clearly that I have plenty of memory left.
    Attachments:
    Error.jpg ‏18 KB

  • Problem when passing string array in sessions showing null value

    i am trying to pass a string array but it is showing me the null value
    i think the the problem is seem to be in session.settAttribute("subject['"+i+"']",subject) in 2.login_action.jsp
    or in String sub1=(String) session.getAttribute("subject[0]"); in 3.user_home.jsp
    i have following three pages
    1.login.html
    2.login_action.jsp
    3.user_home.html
    1.login.html
    <html>
    <body>
    <form method="post" action="login_action.jsp">
    Username<input type="text" name="username"></input>
    <br>
    Password<input type="password" name="password"></input>
    <input type="submit" value="login"></input>
    </form>
    </body>
    </html>
    2.login_action.jsp
    <%@ page contentType="text/html"%>
    <%@ page import="java.sql.*" %>
    <%!
    String user,pwd;
    String subject[]=new String[10];
    int i,totalsubject;
    %>
    <%
    try
    user=request.getParameter("username");
    pwd=request.getParameter("password");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:ods","scott","tiger");
    PreparedStatement ps = con.prepareStatement("select password from users where username='"+user+"'");
    ResultSet rs = ps.executeQuery();
    if(rs.next())
    if(rs.getString("password").equals(pwd))
    session.setAttribute("username",user);
    PreparedStatement ps2 = con.prepareStatement("select subject_id from allot_teachers where staff_id='"+user+"'");
                        ResultSet rs2 = ps2.executeQuery();          
                             while(rs2.next())
                             i=0;
                             subject[i]=rs2.getString(1);
    // if i display here the subjects in out.println(subject[i]) it is working fine
    // but in next redirected page it is showing null
                             session.setAttribute("subject['"+i+"']",subject[i]);
                             //out.println(subject[i]);
                             i++;
    response.sendRedirect("user_home.jsp");
    else
    out.println("error invalid username or password");
    else
    out.println("error invalid username or password");
    con.close();
    catch(Exception e)
    out.println(e);
    %>
    3. user_home.jsp
    <%@ page contentType="text/html"%>
    <%@ page import="java.sql.*" %>
    <html>
    <%
    String user,pwd,cat,cat1;
    String username=(String) session.getAttribute("username");
    if(username==null)
    response.sendRedirect("login.html");
    //just tried for first two subjects
    String sub1=(String) session.getAttribute("subject[0]");
    String sub2=(String) session.getAttribute("subject[1]");
    //here it is printing null
    out.println(sub1);
    //here it is printing null
    out.println(sub2);
    %>
    <form method="post" action="logout.jsp">
    <input type="submit" value="Logout"></input>
    </form>
    </html>
    Cheers & Regards
    sweety

    The name in getAttributre doesnt match the name in setAttribute.
    Note "subject[0]" is a string containing 10 chars, "subject" is a string containing 7 chars.
    Here is your code:
    session.setAttribute("subject",subject);
    String sub1=(String) session.getAttribute("subject[0]");

  • Pass String Array to DLL

    Hi,
     I m trying to pass a String Array to a DLL, but I can't found the type for the  "Char *heihei[ ]"
    Here I attached the screenshot here. Hopefully some expert here can help me to solve out this thing. Thanks a lot in advance.
    DLL input:
    int __stdcall RunDLLUI (char * pszMainPath, char * pszFileName, int * nArrayErrorRow, char * pszArrayErrorCol[], int nNumOfErrors, int nOffsetError);          
    Please refer to the pictures attached. Thanks again for your time.
    Attachments:
    code.JPG ‏29 KB
    front.JPG ‏40 KB
    DataType.JPG ‏49 KB

    You should post your LabVIEW question to the LabVIEW board.

  • How to address an cell in a boolean array

    Hello
    I am intersted in addessing a certain cell in a boolean array.
    Suppose I have a boolean array called bArr which is of length 10 and contains  values  of { T,T,F,F,F,F,T,F,T,F }
    and I want to send to an "AND" gate bArr[0] together with  "TRUE" constant.
    How do I address the cell bArr[0] or any other cell in bArr ???
    Lavi
    P.S: I am using LabVIEW 8.0 

    Hi Lavi,
    You could ve easily given me 5 stars atleast !
    - Partha
    LabVIEW - Wires that catch bugs!

  • On my mac, when trying to overwrite the old software with the new, I'm being told I don't have access to certain information and I cannot complete the install.

    I just downloaded the latest version of firefox. When trying to drag the new version into my applications folder it asks if I want to override the previous version. I say yes. Then I get a message saying this task can't be completed because I "don't have access to certain information." I don't know what this means or how to override it.

    Welcome to the Apple community Michelle.
    If you mean that Find My Phone is asking for a password to a different Apple ID to your current Apple ID and that ID is a previous version of your current ID, not an entirely different one.
    This feature has been introduced to make stolen phones useless to those that have stolen them.
    However it can also arise when the user has changed their Apple ID details with Apple and not made the same changes to their iCloud account/Find My Phone on their device before upgrading to iOS 7, or if you restore from a previous back up made before you changed your details and some other circumstances.
    The only solution is to change your Apple ID back to its previous state with Apple at My Apple ID using your current password, you don’t need access to this address if it’s previously been used with your Apple ID, once you have saved these details enter the password as requested on your device and then turn off "find my phone" and delete the account from your device. It may take a short while to remove the account.
    You should then change your Apple ID back to its current state, save it once again and then log back in using your current Apple ID. Finally, turn "find my phone" back on once again.
    This article provides more information about Activation Lock.

  • Problem with empty report parameters when passed to PL/SQL function

    Hi,
    We have come across what appears to be a bug in the JRC. When passing a report parameter to a PL/SQL function as a parameter, empty parameters are changed before being sent to the function. More specifically, an empty string "" ends up as the value "(')" in the PL/SQL function parameter. In our report we print the report parameters on the first page so we know that the parameters are OK before being passed to the database.
    The problem exists for version 12.2.203, 12.2.204 and 12.2.205 of the JRC.
    We have identified a workaround, but it is not exactly elegant: Before executing the report we modify all empty  parameters ("") to " " . In the PL/SQL function, we trim all parameters before using them.
    We call the function using a command object with a sql syntax like this example:
    select * from table (qa_batch_release.get_qa_br('{?p_report_id}','{?p_reg_set_number}','{?p_cr_number}','{?p_change_id_decode}','{?p_country_id}','{?p_mfg_item_no}','{?p_4_no}','{?p_5_no}','{?p_7_no}'))
    The PL/SQL function is a table returning function.
    Best regards, Thor

    Hi Kishore,
    using #COLUMN_VALUE# would probably not make much sense, because normally a report has multiple columns and not just the numeric column which you want to verify if it's negative. But APEX will fire the template condition for each column, because the report template is a column cell template.
    What you can do to make it more generic is to use for example
    #CHECK_AMOUNT#
    in the template and provide a not displayed column in your SQL statement which contains your value which is named CHECK_AMOUNT. For example:
    SELECT NAME
         , BALANCE
         , BALANCE AS CHECK_AMOUNT
    FROM XXX;Because this CHECK_AMOUNT column would be a generic name, you can use this template in all your reports as long as you provide this column.
    Thope that helps
    Patrick

  • Database, Dataset, Table Adaptors Error "Unable to load, Update requires a valid DeleteCommand when passed DataRow collection with deleted row"

    Microsoft Visual Basic 2010 Express.
    I am new to Visual Basic programing and i am trying to understand the relationships between Datasets, database, table Adaptors. I have to following code that is is giving me the following error" Unable to load, Update requires a valid DeleteCommand
    when passed DataRow collection with deleted rows". 
    I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    It seems that i can delete the data on the DataGridView Table and it only displays the correct data. but my database is not updating, even though the data grid displays differently.I can determine this because, when i save the offset database, i have all
    the previous uploads and all the rows that i wanted to delete are still there.
    My final goal is to be able to import offset data from a CSV file, save this data on the pc, send a copy of this data to a NuermicUpDown so the customer can modify certain numbers. From here they download all the date to a controller.  IF the customer
    needs to modify the imported data, they can go to a tab with a data grid view and modify the table. They will also have to option to save the modified data into a csv file.  
    Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    CODE:
    Private Function LoadOffSetData()
            Dim LoadOffsetDialog As New OpenFileDialog 'create a new open file dialog and setup its parameters
            LoadOffsetDialog.DefaultExt = "csv"
            LoadOffsetDialog.Filter = "csv|*.csv"
            LoadOffsetDialog.Title = "Load Offset Data"
            LoadOffsetDialog.FileName = "RollCoaterOffset.csv"
            If LoadOffsetDialog.ShowDialog() = Windows.Forms.DialogResult.OK Then  'show the dialog and if the result is ok then
                Try
                    Dim myStream As New System.IO.StreamReader(LoadOffsetDialog.OpenFile) 'try to open the file with a stream reader
                    If (myStream IsNot Nothing) Then 'if the file is valid
                        For Each oldRow As MaterionOffsetDataSet.OffsetTableRow In MaterionOffsetDataSet.OffsetTable.Rows
                            oldRow.Delete()                       
    'delete all of the existing rows
                        Next
                        'OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        Dim rowvalue As String
                        Dim cellvalue(25) As String
                        'Reading CSV file content
                        While myStream.Peek() <> -1
                            Dim NRow As MaterionOffsetDataSet.OffsetTableRow
                            rowvalue = myStream.ReadLine()
                            cellvalue = rowvalue.Split(","c) 'check what is ur separator
                            NRow = MaterionOffsetDataSet.OffsetTable.Rows.Add(cellvalue)
                            Me.OffsetTableTableAdapter.Update(NRow)
                        End While
                        Me.OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)
                        MainOffset.Value = OffsetTableTableAdapter.MainOffsetValue          'saves all the table offsets
    to the offset numericUpDown registers in the main window
                        StationOffset01.Value = OffsetTableTableAdapter.Station01Value
                        StationOffset02.Value = OffsetTableTableAdapter.Station02Value
                       myStream.Close() 'close the stream
                        Return True
                    Else 'if we were not able to open the file then
                        MsgBox("Unable to load, check file name and location") 'let the operator know that the file wasn't able to open
                        Return False
                    End If
                Catch ex As Exception
                    MsgBox("Unable to load, " + ex.Message)
                    Return False
                End Try
            Else
                Return False
            End If
        End Function

    Hello SaulMTZ,
    >>I can track the error and its located in "OffsetTableTableAdapter.Update(MaterionOffsetDataSet.OffsetTable)" code. What am i missing?
    This error usually shows that you do not initialize the
    DeleteCommand object, you could check this
    article to see if you get a workaround.
    >> Im not sure if i am making this overcomplicated or if there is a easier way to program this.
    If you are working CSV file, you could use OleDB to read it which would treat the CSV file as a Table:
    http://www.codeproject.com/Articles/27802/Using-OleDb-to-Import-Text-Files-tab-CSV-custom
    which seems to be easier (in my opinion).
    Regards.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to restrict AS02 access to certain fields only

    How to restrict AS02 (Asset Master Record) access to certain fields only. Currently when you assigned AS02 to a certain user, this will enable the user to change all the fields in the asset master record. Suppose i want only the user to restrict the access to certain field eg.NDJAR (Life in Yrs).
    Thanks for your inputs.
    Regards,
    Robert

    hello,
    basis has to assign the proper activity with object A_S_ANLKL. in this case they have to allow activity 03 only with combination of Cocode,asset class. see some more details below.
    This authorization object is the first part of the object "asset master record."
    The definition at this level determines whether the user is authorized to process data in a given company code. The activity type for the transaction is also defined here. This authorization object is used for master data transactions, for the display of value fields, and for reporting.
    Defined Fields
    The following fields are assigned to the authorization object
    Asset class (specified by entering a value in the pop-up window)
    Company code (specified by entering a value in the pop-up window)
    Activity type - there are three different activity types:
    01 = Create
    02 = Change (including blocking and deleting)
    03 = Display

  • Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.

    Firefox hangs and will not allow me to access other programs running when I resize a pop up window, move a pop up window, accidentally right click flash content.
    == This happened ==
    A few times a week
    == Not sure when it statrted

    Hi.
    When this happens, please press CTRL+SHIFT+ESC and see how much RAM and CPU Firefox is using. If they're sky high, then... Well, that kind of issues are, unfortunately, more common and the we'd like. Thankfully, 99% of the cases are very easy to solve. However, you do need to diagnose what your exact problem is. Do this:
    #run Firefox in safe-mode to disable all extensions and plugins. If this fixes your issues, be them with RAM or CPU usage, then you know it's a problem with plugins or extensions. Proceed to number 2. If safe-mode doesn't fix the issues, then read bellow, after this list;
    #update all extensions and plugins in your Firefox. If this doesn't solve the issues, proceed to the following number;
    #disable all extensions and plugins in your Firefox (not running safe-mode). Being certain that, as in safe-mode, the problems you're having have gone away, enable one plugin at a time. You should be certain that you WANT that plugin to be enabled, so keep your overall number of plugins as low as possible. When you encounter the problems, you know you've found a problematic plugin, so disable it for good. Keep enabling all plugins (except problematic ones) until you've gone through them all.
    #enable one extension at a time. Again, be certain that you WANT that extension to be enabled, so keep your overall number of extensions as low as possible. When you encounter the problems, you know you've found a problematic extension, so disable it for good. Keep enabling all your extensions (except problematic ones) until you've gone through them all;
    #you're done! You've fixed your problems with problematic add-ons.
    Ok, if disabling all extensions and plugins through safe-mode didn't work to bring Firefox's CPU and RAM usage to good levels, then you have different issue. The most likely scenario is that you have a third party software running on your computer that is messing with Firefox. Do as follows:
    #do a virus/malware check on your computer. If this doesn't fix it, proceed;
    #disable all software running in the background that you don't want to have running in the background (in windows, this is done by pressing WINDOWS+R in your keyboard, typing "msconfig" (without the commas) and pressing enter. Now, under the "Startup" tab, you can uncheck the software you don't want, and reboot your system for changes to take effect. If you're unsure of what software you want running, ask someone with more experience). If this doesn't fix you issues with Firefox, proceed;
    #check your firewall/antivirus/security suite for enabled functions/features that you don't want and/or may be conflicting with Firefox. You'll find that these features are most likely tied to Internet Security features, such as link scanners or URL checkers and the like. If you're not sure they are conflicting with Firefox, simply try to disable to see whether or not that's true. As long as you don't browse the web with your antivirus completely off and your firewall completely turned off, there should be no problems. If this doesn't solve the issues, proceed to the following number;
    #check your operating system security options, mainly advanced options that are not configured by default. While it's very unlikely that this may be the cause of the problem (after all, it's the last item on the list), it's remotely possible. If this doesn't do it, I'm out of ideas. Except make sure you've followed my instructions correctly.

  • Prevent certain cells in TreeView from being selected!?

    Hi,
    is it possible to prevent certain cells in a TreeView from being selected?
    I have a TreeView and the TreeItem's on the first "depth" should not be selectable.
    I tried to add an EventHandler to the tree item and caught Event.ANY, but no event was dispatched, when a cell was selected.

    Research eventFilters in combination with event.consume():
    http://docs.oracle.com/javafx/2.0/api/javafx/scene/Node.html#addEventFilter%28javafx.event.EventType,%20javafx.event.EventHandler%29
    Other ways to accomplish this may be via a custom selectionModel:
    http://docs.oracle.com/javafx/2.0/api/javafx/scene/control/SelectionModel.html
    http://docs.oracle.com/javafx/2.0/api/javafx/scene/control/TreeView.html#setSelectionModel%28javafx.scene.control.MultipleSelectionModel%29
    Or by adding a ChangeListener to the selectedItems property of a the default TreeView selectionModel and setting the items to not be selected if it is the at the first "depth".

  • I can't open certain website when I am on the 4G LTE network.

    And it isn't just my phone others can't open them either when on the network. What causes this. They open when my phone is on wifi?

    beyerbeware,
    Look no further help is here! What websites are you trying to access on your cell phone? What happens when you try accessing those website? Are you getting an error message? Have you been able to access them in the past?
    JohnB_VZW
    Follow us on Twitter @VZWSupport

  • What type of license should the user be assigned when passing transactions through the DI Server?

    What type of license should the user be assigned when passing transactions through the DI Server?
    We used to assign indirect access licenses to users that were just using the DI Server.  We have one add-on developer that says that the user has to be a Profession license. Current environment is SAP B1 9.0 PL10.  My understanding was that you could have up to 10 users assigned to a single DI Server license.

    Hi,
    From the license guide,
    Indirect Access – has access to any SSP solutions (developed with the SAP Business One DI-API) only. The Indirect Access license is bundled with the DI server. Users who have an Indirect Access license can access a limited number of application forms, but cannot perform any functions with the SAP Business One application. Users who have an Indirect Access license can access an unlimited number of SSP solutions
    Thanks & Regards,
    Nagarajan

  • I AM NOT IN QUEBEC BROWSER SAYS I AM. THEREFORE I CAN'T ACCESS TO CERTAIN WEBSITE

    I live in Toronto but When I access to certain website such as urbanoutfitters, clubmonaco.ca
    I can't access to those
    it says
    Due to the Charter of the French Language, we are unable to offer our website to the province of Quebec, at this time.
    please!! help

    I too am in Toronto, and have no problem accessing the sites you mention.
    What is your location shown as in System Preferences / Date and Time / Time Zone?

Maybe you are looking for

  • Lack of control over iMessage

    The purpose of this post is less of a question and more of a collection of the frustrations I have had with trying to use iMessage. First off, the idea of iMessage seems great. Transparently allow users end to end encryption of their messages over a

  • Sound from front speakers only

    I am using optical audio with Sony DAV-DZ810 home theater and my Apple TV2. The system is new and I am not very familiar. When I watch a trailor (have not watched a movie yet) on ATV2, I notice that sound only comes from two front speakers only. No s

  • Mac now, PC later – Is this possible?

    I bought my significant other a new 30G iPod as a gift, and initially we'd be using both iPods with one computer, my iMac. But she's buying a new PC later, and I'm wondering if she will be able to use her iPod on the new PC, even if it was first used

  • Attaching photos to email

    I have an iphone 4 and want to pick the size of photo to attach to an email before it attaches. My phone used to let me do this but then last night, it stopped and now only seems to attach a full res pic. Any suggestions? Thanks

  • Execute a workbook in background???

    hi collegues We are working with a BIW 7.0 and we want to execute in background a workbook. Do u know if itś possible? Could you give some ticks or steps to configure it?? we need this functionallity to send directly the woorkbook (with data) to the