02-16-2011 11:13 PM - edited 02-16-2011 11:17 PM
Hi ,
I have a program to show a table , in the 32-bit mode, it works good, but if chang into the 64-bit, the function returns an error. The error should be the 4th parameter of the function, in its help document, it said: "If the cell type is VAL_CELL_STRING, VAL_CELL_RING, VAL_CELL_COMBO_BOX, or VAL_CELL_BUTTON, the function expects a NUL-terminated string. When allocating the array, assume that each element requires four bytes of storage."
I think in the 64-bit mode, it should hold eight bytes of storage. the program attached here.
David
02-17-2011 10:02 AM
David,
Yes, this is a known problem in CVI 2009 and 2010. The functions SetTabCellRangeVals and GetTabCellRangeVals don't work well when used with string cells in 64-bit program. This will be fixed in the next maintenance release. The workaround, for the time being, is to iterate though each cell using SetTabCellVal / GetTabCellVal.
If you do use this workaround, and you're worried about performance and/or flashiness, you can temporarily hide the table control while you iterate through the cells. That will avoid a redraw after each call to SetTabCellVal.
Sorry about the inconvenience.
Luis