Is there a bug in CVI 2010 SetTableCellRangeVals and SetTableCellRangeAttribute for strings - particularly in 64-bit mode?

It seems that I can't get SetTableCellRangeVals to publish string data to a table in 32-bit mode, I can't SetTableCellRangeAttribute to work for arrays of strings and now it seems numbers either. I just get garbage - it could be my code, however.

Worse in 64-bit mode, I can't seem to post anything (for strings at least), but get a GP fault instead.

I played with the size of the pointer in the array of strings (from 4 to 8 bytes

The heart of the test code is here but the files are attached as well.

int CVICALLBACK Test_callback (int, int int event, control panel,
void * callbackData, int eventData1, int eventData2)
{
int i, numrows = 10, byattrib;
int bit32 = 1;
Double * dbl_array;
char * string_array, * string;
Rect a_rect;
 
switch (event)
{
case EVENT_COMMIT:
GetCtrlVal (main_handle, PANEL_BYATTRIB, & byattrib);
String = malloc (50 * sizeof (char));
If (bit32)
string_array = malloc (4 * numrows * sizeof (char));
on the other
string_array = malloc (8 * numrows * sizeof (char));
for (i = 0; i< numrows;="">
string_array [i] = malloc (50 * sizeof (char));
dbl_array = malloc (numrows * sizeof (double));
   
for (i = 0; i< numrows;="">
{
dbl_array [i] = i * I * 3.1416.
FMT (string, "The value is %f", dbl_array [i]);
strcpy ([i] string_array, string);
}
   
a_rect. Top = 1;
a_rect. Left = 1;
a_rect. Height = numrows;
a_rect. Width = 1;
   
status = DeleteTableRows (main_handle, PANEL_TABLE, 1, -1);
   
status = InsertTableRows (main_handle, PANEL_TABLE,-1, numrows, VAL_USE_MASTER_CELL_TYPE);
   
If (byattrib)
{
status = SetTableCellRangeAttribute (main_handle, PANEL_TABLE, a_rect, ATTR_CTRL_VAL, dbl_array);
   
a_rect. Left = 2;
status = SetTableCellRangeAttribute (main_handle, PANEL_TABLE, a_rect, ATTR_CTRL_VAL, string_array);
}
   
on the other
{
status = SetTableCellRangeVals (main_handle, PANEL_TABLE, a_rect, dbl_array, VAL_ROW_MAJOR);
   
a_rect. Left = 2;
status = SetTableCellRangeVals (main_handle, PANEL_TABLE, a_rect, string_array, VAL_ROW_MAJOR);
}
   
free (string);
for (i = 0; i< numrows;="">
free (string_array [i]);
free (string_array);
free (dbl_array);
break;
}
return 0;
}

Thanks for any help,

Greg

Greg-

Certainly, you have found a bug.  However, I think that the issues that you run in a SetTableCellRangeAttribute are the result of a misunderstanding of the function.  This function, when you use it to set the value, sets the values of all the cells in the range to the same value.  Therefore, the var_args parameter must be the value that you want to set all cells to and not a pointer to an array of values.  In your code, you would need dereference the berries, and then, you would see that all the cells are the same value, which is the expected behavior.

I created a bug report for the accident which follows from the definition of values on string cell types in 64 - bit with ID 284842.  This bug will be fixed in the next version of maintenace of the CVI.  In the meantime, you should be able to use SetTableCellVal to set the value of each cell individually in 64-bit.

I'm sorry for the inconvenience-

NickB

National Instruments

Tags: NI Software

Similar Questions

  • Is there another solution to integrate NAC Appliance and Active Directory on Windows 2008 64 bit

    I'm trying to integrate a device of the NAC solution in a network where all domian servers and application servers are Windows 2008 64-bit.

    Could someone help me to confirm if Active Directory (AD) on Windows 2008 is not taken in charge and tell me what alternatives exist to authenticate users who consider that it is not possible to make any changes on the server. They will continue to be Windows 2008 64 bit.

    The original idea was to use AD SSO to authenticate users, but I read that it is not supported on Windows 2008 64 bit.

    I'd appreciate any help or suggestions.

    Concerning

    Arturo Monroy

    Arturo,

    You can use LDAP. Configure an LDAP authentication provider and have your customers to provide their credentials.

    It will not however a single code access scenario. They would have to enter their credentials again on the NAC agent.

    Support for 64 - bit is on its way and will be out in the new versions soon.

    HTH,

    Faisal

  • Use Oracle oci in CVI 2010

    Does anyone have experience using Oracle oci in CVI 2010 on Windows 7? Should I install 64-bit or 32-bit Oracle Instant Client? It is sufficient to compile the program that accesses Oracle data, do I need to have the Oracle database and the ODBC Manager put in place?

    Marg SZ wrote:

    Does anyone have experience using Oracle oci in CVI 2010 on Windows 7? Should I install 64-bit or 32-bit Oracle Instant Client? It is sufficient to compile the program that accesses Oracle data, do I need to have the Oracle database and the ODBC Manager put in place?

    you didn't have to buy the Toolbox, even think it makes your job easier

    http://orclib.sourceforge.NET/

    http://www.orafaq.com/wiki/Oracle_Call_Interfaces

  • Other fonts "NIDialog" when the current CVI 2010 programm after 2012 runtime is installed

    I noticed a change in police during execution of a program of CVI 2012 meadow with runtime 2012.

    She seems to be the police "NIDialog", unless it is "NIDialogMeta".

    The user interface looks like it should when editing it in CVI 2010.

    Is - is this expected?

    There are UI editing type of a bet...

    Yes, you are right. It seems that the font that matches the dialog box OR changed in 2012 of the CVI. It's something that should have been called explicitly in the readme file, and I apologize for this oversight.

    OR dialog is, by design, a "variable police." This means that it is a policy that can match different fonts in differect computers because it is linked to an alias (DEFAULT_GUI_FONT) that resolves to different real fonts in different computers, operating systems different and potentially (as here) different versions of the CVI runtime. What has happened in this case, is that a bug has been fixed in CVI 2012 that ICB previously did take into account the Microsoft font substitution table:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

    Going back several years now, DEFAULT_GUI_FONT corresponded to MS Shell Dlg. It seems to me that MS Shell Dlg is a bit outdated and so it has in the FontSubstitutes table above, as well as applications to replace it with something else. In my PC, which becomes "Microsoft Sans Serif". Before CVI 2012, it has been incorrectly not replaced with Microsoft Sans Serif, whereas it is now.

    Sorry about that.

    Luis

    NEITHER

  • The CVI 2010 SP1 download link works?

    The downloaded file from SP1 link seems to be the unserviced pack version. After the 'install' which took place much too quickly, the help > about shows LW/CVI 2010 Version 10.0.0 (360). Am I missing something or am I just too early?

    Hello

    There has recently been some changes made to the experience of downloading on ni.com.  To get the latest download for the ICB, please visit ni.com/downloads.  There you should find the LabWindows/CVI 2010 SP1 download.

    Let me know if you have any problems,

    NickB

    National Instruments

  • "Mesa.dll is not found" from CVI 2010 installation

    When I launch an executable file that has been installed from a distribution kit created with CVI 2010 (360), I get the message "Mesa.dll is not found." But I do not see that the file is installed in C:\Program NIUninstaller Instruments\Shared\Mesa.  If I replace this file with a mesa.dll more than a previous version of the CVI, my newly installed executable launches properly.

    Hi mrtqs,

    While testing on this issue, I came across a similar problem.  From my understanding, the CVI Run - Time Engine will also install of VS 2008 C++ Runtime parts.  According to that the CVI Run Time options you choose to install a different part of the runtime C++ 2008 VS will be included in the installation.  It seems that Microsoft has been able to modify the runtime C++ VS 2008 for some parts, but not others, which is what causes the problem.  As a result, there are a few options:

    1. install the runtime full CVI with default settings

    2 leave out the ActiveX module if does not necessary

    3. install the runtime C++ 2008 VS separately on the deployment computer.

  • LabWindows CVI 2010 and GetProcessAddress()

    I use v10.0.1 Labwindows CVI 2010 after the upgrade to version 2010 CVI v10.0.0. After the upgrade, I have a compilation error of a statement that compiles fine in the previous version. The error is:

    «= Operands are types illegal "pointer to __stdcall int function (int, pointer to char, char pointer, pointer to char, int, pointer to char, pointer to char)' and"FARPROC".»

    What causes this error is the following statement in the code:

    my_FP = GetProcAddress (dll_handle, "DLL_FUNCT");

    and the definition of my_FP is:

    int __stdcall (* my_FP) (int x, y of char [], char [z], char * m, int g, char A [], char [] B);

    (the parameters and the function names have been changed for simplicity)

    As I said, this line compiles fine in the 10.0.0, version but not in 10.0.1. Y at - it a specific update to the compiler that will cause this error? What can be done to fix this?

    I thank very you much for your time and your help.

    You are right. This was caused by a change in the SDK Windows CVI headers that took place in the 2010 SP1 version. The change has been associated with bug fix #275934. Unfortunately, this bug fix introduced this unwanted side effect to require a cast for any function that returns a function (such as GetProcAddress) FARPROC poinrter. On reflection, this side effect is unacceptable and needs to be fixed in the next version. This is followed internally with bug ID #336341.

    I'm really sorry for this inconvenience. Until the problem is solved using the typedef & cast you have already implemented is a valid alternative.

    Another solution, if you're worried about other projects or other functions, where this error can also appear, is to edit CVI2010\sdk\include\windef.h and replace the following definitions of FARPROC (line 226 and 230, respectively):

    typedef INT_PTR (away from WINAPI * FARPROC) (void);

    typedef int (away from WINAPI * FARPROC) (void);

    with:

    typedef INT_PTR (away from WINAPI * FARPROC) ();

    typedef int (away from WINAPI * FARPROC) ();

    This will avoid the problem throughout a facility given to the CVI.

    Luis

    NEITHER

  • How can I convert a LabWindows/CVI 2010 project to a Visual Studio 2011 project?

    I have a good size project, 12 source files, headers 14, 1 uir, I want to be able to edit and compile in MS Visual Studio 2011, MSVC ++.

    I remember that we tell him that LabWindows dropped support for C++ in 2008 and is more had a wizard to convert projects. I know that I can follow the path of the DLL, but I have never created a DLL before and don't know where to start with it. What would be the best way to go about this conversion?

    CVI 2010 always supports the Assistant Conversion of Visual Studio to Visual Studio 2005/2008. We are not planning to add support for VS 2010 in a later version.

    If you need a project to VS 2010 now, you can use the Visual Studio 2008 conversion wizard, and then upgrade the project VS 2008 for VS 2010.

  • _WIN32_IE different value in 2009 of the CVI and CVI 2010

    Hello everyone, I have a special problem, that I have not experienced before. I hope that I'm not the first person to deal with this problem...

    I have a code written and properly compiled in 2009 CVI source and just trying to compile it in CVI 2010 as it is, until I make my changes. The problem is that, in 2010, the NM_CUSTOMDRAW defined in CommCtrl.h (and other things used in the source code) (see below) is not found by the pre-procesor because _WIN32_IE value is not the same as in 2009 of the CVI. I wonder if this _WIN32_IE is set by the compiler itself. I tried to change it in the Build-> Configuration-> Manage configuration-> Edit-> Build options-> compiler sets by adding the /D_WIN32_IE sentence = 0 x 0300, but then the compiler says "ilegal expresion" at the first time, it takes the value _WIN32_IE in ShellAPI.h. I have the same error in compilation for 64 and 32.

    Suggestions please!

    CommCtrl.h

    ...

    #if (_WIN32_IE > = 0 x 0300)
    #define NM_CUSTOMDRAW (NM_FIRST-12)

    ...

    Josete Hello,

    Which is the line which gives you errors? Is it in your code or in a headder file? NM_CUSTOMDRAW use in your code?

    / D_WIN32_IE = 0 x 0300 in the compiler sets should work. What is the line that gives you an error in ShellAPI.h?

    Could you please list the headers you include in a file that gives you an error.

    To understand how the preprocessor directives are expanded, you can use the menu Options-> pre-treatment of Source files from a window of the source editor.

    Constantin

  • Cannot compile the project in CVI 2009 which were previously opened in CVI 2010

    This was extremely irrititating and does not know what the devil.  I have a computer with CVI 2010 and separated with CVI 2009.

    I have a project and the CWS, which was established in 2009.

    I opened and recompiled in CVI 2010 things since then, ensuring that I saved my .uir file in a CVI 2009 version or earlier.

    I usually open the file .prj or .cws on my computer of CVI 2009, but trying to compile and run in debug mode, all of the CVI crashes.  How can I recompile and work with it on my computer of CVI 2009?

    Am I missing something here?  Tehre are no error, warnings or reports of incidents, CVI righteous acts as I hit Alt + F4


  • I have the version of visual studio 2010 ultimate and aparently there is a beta version of it 2011 and I would like to know if I can install the ultimate version 2011

    Hello, I have the version of visual studio 2010 ultimate and aparently there is a beta version of it 2011 and I would like to know if I can install the 2011 ultimate overwrting the 2010 release of visual studio 2010 ultimate version. should I uninstal it manually first? (even if I deleted the main application, some remained after) what should I do? I need help with this problem because I don't know if I need to uninstall the version of 2010 in order to install the new 2011 beta version or I just have to update like a normal program?

    Hello

    You'd be better suited post directly in the Visual Studio Forum for your questions.

    "" Installation and configuration of visual Studio".

    http://social.msdn.Microsoft.com/forums/en/vssetup/threads

    See you soon.

  • Clock on windows 8 is wrong time, I tried to set the time of the internet but its still not working, think theres a bug in the clock time, anyone have the same problem for windows 8 and know how to fix?

    Clock on windows 8 is wrong time, I tried to set the time of the internet but its still not working, think theres a bug in the clock time, anyone have the same problem for windows 8 and know how to fix?

    It sets obtained :-) Sorry for the delay

    Thank you very much! has worked perfectly!

  • Is there a bug with handling binary_double columns?


    Hello.

    I use Apex 4.2.1 against Oracle 11 g 2 and mod_plsql.

    I tried to create a new page via the 'Form on a Table or view' option and using an Oracle table that contains more than one column of type BINARY_DOUBLE.  The new wizard, automatically highlighted all my columns in table to be included in the form and the form has been created without any errors.  However, when I went to edit the newly created form, I saw that all the columns of type BINARY_DOUBLE disappeared.  The other columns in the table (INTEGER, VARCHAR2, DATE, etc.) were all there.

    At first, I thought that, maybe, I'd made a mistake.  And so, I deleted my page and tried with the same exact results.

    I then added manually columns missing BINARY_DOUBLE, ensuring to designate 'source' as a 'database'.  Apex had no problem in creating these.

    Subsequently, I have tried insert rows in my table using this form.  I found that I could create new rows in my table with all fields filled, including the BINARY_DOUBLE type.  However, to my surprise, when I then tried to change the saved lines, values for all columns of type BINARY_DOUBLE appeared as NULL in the corresponding form fields.

    I use IE10.  Then I went to same IE8 and IE9.  I then went to Firfox 16.x.  All have the same behavior.

    Then, I changed my table, changing all BINARY_DOUBLE type NUMBER columns.  When you do that, everything worked as expected.  I recreated my form on the page and found * all * the columns present and accounted for.  And I was able to create and modify lines without problem.

    If anyone know what could cause this strange behavior?  I don't know that this is not a "function".  And so I wonder if this is a bug.

    Thank you.

    Elijah

    Hi Elijah,

    Thank you for reporting this issue. I filed bug #16939492.

    Kind regards

    Christian

  • Is there a bug in the as3 tween class

    Is there a bug in the as3 tween class that causes interpolations is stopped before completing. I read that there is and that a 3rd party tween class should be used. I'm starting to learn as3 and experimentation, but it would be good to know when I move on more complex projects.

    The solution for this would also make your overall function. It simply means place your feature in the top level of your film.

    I did some research on this topic, but I found a lot of conflicting answers.

    Any help is welcome thanks in advance.

    interpolations should NOT be local to a function.  otherwise, they are likely to be gc would be before they finish.

  • MS Office 2010 Pro and my printer does not work,

    I just installed MS Office 2010 Pro and my printer does not work, I tried to print a test page for the printer, but that prints either, ask if I want to troubleshoot the printer and when I click on Yes, I get a message that there is a problem of ActiveX.  The printer will not print not any application, but it worked before installing office.
    All the apps work except in order to print it.
    I am running WinXPPro w/sp3.

    Jim K.

    Hello

    1. What is the exact error message?
    2. don't you make changes on the computer before the show?
    3. What is the brand and model of the printer?
    4. this problem occurs with all files that contain the Active X objects or specific file?

    Method 1:
    Run the fix it and check.
    http://support.Microsoft.com/mats/printing_problems/en-us

    Method 2:
    Try the steps in the link and check.
    Printer in Windows problems
    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

    Method 3:

    This problem occurs if the security settings for the Local computer zone are configured to prevent the ActiveX content to run.

    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base: http://windows.microsoft.com/en-US/windows-vista/Back-up-the-registry : how to back up and restore the registry in Windows

    a. Click Start and run, type regedit.exe, and then click OK.

    b. expand the following registry subkey:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0

    (c) in the right pane, right-click 1200 and then click on edit.

    d. in the value data box, type 0. Then, click OK.

    e. close the registry editor.

Maybe you are looking for

  • Satellite A305 - hard drive corruption

    Hi, recently my laptop crashed. When I tried to reboot it failed. When I tried to go into safe mode, it hangs while loading. When I tried to go into the Startup Repair, it crashed on the laundry. The only thing I could get was the BIOS. I tried to re

  • Satellite A210-MS9 overheats like crazy with the fans always on

    Dear forum members (and guests) I am a happy owner of the Satellite A210-MS9 laptop, and I'm having a major problem. This notebook is so hot, for nothing. as it will close for more than a day and the second I turn it on. the fan mounts like crazy and

  • Re: Question about HARD drive partitions

    My uncle bought me a laptop Satellite A100 European 5 months ago and I don t have the card with me. Then all of a sudden, my operating system has been corrupted and I had to format my hard drive. I used the recovery CD I received with the laptop. The

  • COA is damaged. Only the partial product code.

    I am repairing a computer for a customer and had to reinstall Windows Vista Home Premium, 32-bit.  The certificate of Authenticity on the side of the computer is damaged while there are 3 to 5 characters (illegible) missing from the product code.  Ho

  • NavigationMovement does not work on BB tour (9630).

    Hi guys. I am facing a problem associated with method MainScreen.navigationMovement. This method does not work on BB tour. I compiled the application using JDE 4.2.1. My code is the same as this: private class MyScreen extends form {} {} public boole