Read a structure written in VC

I have written a structure in VC and saved to a file, I want to read the file in LV8.0 but I cann't get the right result, the structure is  below:
struct Save_Data {
  int  A1;
  int  A2; 
  double A3; 
  double A4;
  double A5;
  double A6;
  double A7;
  int  A8;
  int  A9;    
  double A10;    
  int  A11;
  int  A12;   
  double A13;     
  bool A14;
  bool A15;
  bool A16;
  double A17;
  double A18;
  double A19;
  double A20;
  double A21;
  char A22[6];
  char A23[6];
  char A24[6];
 }SaveData;
In the VC6.0 I found the structure saved in the file are bigger than the size of the structure described in VC, I don't know why.
I write a vi to read the file, but I cann't get the the three char array, The vi and file ared attached.
Attachments:
data file.txt ‏1 KB
read file.vi ‏18 KB
read file.JPG ‏24 KB

In C, a string is an array of chars ended by a null char. In LV, it's represented differently. Normally, to get a string from an external function you would either configure the CLF node to return a null-terminated string or you would preinitialize a U8 array of the appropriate size and pass that to the function as an input. LV allocates the memory properly and fills your array and then you can use the Byte Array to String function to get your string.
I'm not sure how such a method would work on a file, but I would try to make the last three elements of the cluster 1D U8 arrays of the appropriate size and see if that works. I didn't see any null characters in the file, but it might work. Another option is to simply read the file and convert it yourself. Yet a third option would probably be to save the structure as plain ASCII and not as a C struct.
Try to take over the world!

Similar Messages

  • The disk could not be read from or written to.  Please help.

    I don't understand why this is not working for me. Let me explain... I have two iPods, one is a 1st Gen and the other one is a Video one. Every time I tried to add music to the 1st Gen iPod I get a message that says - "Attempting to copy to the disk "NameOfiPod" failed. This disk could not be read from or written to." - but when I add music to the iPod Video it goes really smooth without any problems.
    I read the following article and to be honest I didn't find an answer to this issue. http://docs.info.apple.com/article.html?artnum=301267
    I checked the list to make sure everything is on point:
    1. Outdated operating system software
    - I'm up to date
    2. Computer needs updates
    - Again, everything is up to date
    3. Software interference
    - No software has been installed lately
    4. Damaged files
    - I've tried many and same thing happenes
    5. Damaged disk structure
    - Everything appears to be OK.
    6. To repair your computer's hard disk
    - No errors or damaged files
    7. To repair an iPod disk
    - Restored it using latest iPod Updater
    8. Corrupt iPod photo Cache
    - Don't have that, this is a 1st Gen iPod
    9. Lost connection
    - No connection drop
    10. Bad hardware
    - I use the same USB cable for both iPods
    I just don't know what to do next. Let me know if anyone else has another idea.
    Thanks a lot in advance!

    OK! I found what the problem was. It seems that the 1st Gen iPod does not like to be plugged to the front USB port on my G5, weird because my iPod Video has not complained a bit about it. As soon as I plugged the USB cable to one of the back ports it worked flawless. Dragged and dropped my music on it and it went straight in without any errors. Nice, huh?
    Thanks though to those who tried to help me.

  • HT4236 Syncing photos using iTunes in windows revealed this error message "iPad Jayvee cannot be synced because it cannot be read from or written to ." Please advise asap how to resolve the issue.  Thanks!

    Please advise how to resolve error message - cannot be synced because it cannot be read from or written to.

    Hello Janet,
    I would recommend this article named 'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod found here http://support.apple.com/kb/ht1207
    Outdated operating system software
    Make sure you have the latest updates for your operating system, which may include improvements for device connections. For example, many USB and FireWire improvements have been included in Windows Service Packs.Check for Mac OS X downloads. Check for Windows updates.
    Computer needs updates
    Make sure you have the latest updates available for your specific computer model (or components for home-built PCs). These are usually available for download on the support website for the maker of the PC (or component). Many USB updates are listed as "Intel chipset" or just "chipset" updates on PC manufacturer's support and download websites.
    Software interference
    Some software can interfere with iTunes, making it unable to write files to your iPod. Think about what software you have installed, and try disabling any add-ons that might be interfering with iTunes. Check your suspected software's documentation or contact the software maker if you need assistance with disabling the application. Out-of-date or incorrectly configured security software frequently causes this issue. See these steps for identifying and troubleshooting third-party security software.
    Damaged files
    If one of your music files or photos is damaged, iTunes may display one of these errors when transferring that file to the iPod. If you identify a file that is causing the error, try deleting that file and reimporting it from a backup file or from the original source. You may be able to repair files by repairing the disk (see the solutions in the next section).
    Unregistered .dll files (Windows)
    Malware or other software may cause an issue with the digital signing of Windows XP drivers. First try restoringthe iPod using the latest version of iTunes.. If you are unable to restore it or the symptom reappears, follow the steps in this document.
    Damaged disk structure
    These errors can also appear if the format of your computer's hard drive or your iPod disk is damaged.
    To repair your computer's hard disk—Mac OS X users, read this article for instructions. Windows users, search the Help system in Windows for chkdsk to get more information on checking and repairing the disk structure.
    To repair an iPod disk—Restore the iPod or iPod shuffle using the latest version of iTunes.
    Warning: Be sure to back up your data before restoring an iPod. The restore process cannot be undone. All of your songs and files will be deleted.
    Corrupt iPod photo Cache
    If you're getting the error when transferring photos to an iPod photo, try deleting the iPod photo Cache and then starting the photo sync again.
    Lost connection
    Make sure that the connections from your computer to the iPod are snug and do not wiggle or come loose during transfers. For example, if you use the wrong size dock for your iPod, it can put strain on the connectors and cause a bad connection. See these articles for more information:
    Learn about iPod Universal Dock
    iPod Dock: Specifications
    Conflict with third-party hardware
    Third-party USB or FireWire devices may also interfere with iTunes' ability to communicate with your iPod. Remove all USB and FireWire devices except the keyboard and mouse before reconnecting your iPod to the computer.
    Bad hardware
    Hardware failure or non-compliant hardware can cause these errors. This could be an issue with iPod hardware or with the cable or dock you're using, but more often it's an issue with the USB or FireWire card or interface in your computer. Some USB and FireWire interfaces just don't work very well. If you isolate the issue to the USB or FireWire interface in your computer, you may want to try a different port, get the computer serviced, or replace the card or interface with a better one.
    If you isolate the issue to an Apple-supplied cable or dock, or the iPod itself, you can get it serviced here.
    Take care,
    Sterling

  • IPod Error Message: "The disk could not be read from or written to."

    Hello!
    I was syncing my sister's video iPod (30GB) and this error message pops up "Attempting to copy to the disk. "SARAH'S IPO" failed. The disk could not be read from or written to."
    I have restored it three times already, but once it starts putting the music and files back onto the iPod it pops up with that error message. I have updated to the latest version of iTunes and iPod software available. My OS is Windows XP.
    Is this something serious? Will I be able to fix it myself or will I need to send it in to be fixed by Apple? Will that be expensive? We didn’t get the Apple replacement plan. D=
    Any help would be greatly appreciated. Thank you in advance. ^_^
    PowerBook G4   Mac OS X (10.4.3)   15" PowerBook 1.5 GHz PowerPC G4, 1.5GB RAM - Windows XP with iPod 5 Generation

    Okay I went thru that entire list and here's what I got...
    (1) My OS is XP and is running fine.
    (2) I've updated my windows
    (3) I don't know of any software that might be interfering.
    (4) There are no damaged files.
    (5) My Windows hard-drive is not damaged and I've tried restoring my iPod's disk thru iTunes but it still doesn't work.
    (6) I don't have an iPod photo and I can't find the folder to delete the cache if if I did.
    (7) The USB cord is firmly connected into my USB port and my iPod
    (8) My music is on my external hard-drive so I need to keep 3rd-party hardware connected
    (9) I will try another USB cord to see if that works.
    Is there anything else that I can do? Can Apple fix this?
    Please let me know.

  • Disk could not be read from or written to

    I'm a new ipod user. I can get songs on my ipod. But when I go to get photos I get an error message saying, "ipod cannot be updated. The disk could not be read from or written to."
    In itunes I can see the ipod. When I go to look at My Computer, it does not show the ipod as a disk drive.
    Thanks!

    I'm a new ipod user. I can get songs on my ipod.
    But when I go to get photos I get an error message
    saying, "ipod cannot be updated. The disk could not
    be read from or written to."
    In itunes I can see the ipod. When I go to look at My
    Computer, it does not show the ipod as a disk drive.
    Thanks!
    It's so simple, dont worry. Just connect your ipod to the computer. iTunes must open. In iTunes clcik on the small ipod icon which appears at the right bottom of the itunes window. click on that icon and another window with some options will be opened. Click on "enable disk use" and make this selection marked and click ok.
    it'll certainly help!

  • When I update my nano ipod I get an error message "User ipod cannot be updated.  The disk couldnot be read from or written to."   How can I overcome this error message.

    In the iTunes window, when I update my nano ipod, I get an error message "User ipod cannot be updated.  The disk could not be read from or written to."   How can I overcome this error message.

    Hello there dilip77707,
    It sounds like you are getting this error message that your iPod cannot be read from or written to when you are trying to update your iPod Nano. I recommend the troubleshooting from the following article to help you get that resolved. Its pretty straight forward, just start at the top and work your way down as needed:
     'Disk cannot be read from or written to' when syncing iPod or 'Firmware update failure' error when updating or restoring iPod
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Can't sync iPod - Error Message: "disc cannot be read from or written to"

    My ipod had been working fine until recently when every time I try and sync it I get the following error message:
    "Attempting to copy to the disk "iPod" failed. The disk could not be read from or written to"
    I have tried all suggestions in Apple's support article for this issue but nothing works. Does anyone else have this problem or know how to solve it?
    Thanks a lot.
    H
    Macbook Pro   Mac OS X (10.4.10)  
    Macbook Pro   Mac OS X (10.4.10)  

    Hi all,
    I am sorry to report that I too have this same disc error problem when syncing my iPod to my iTunes library. I take no comfort in knowing that I am one of many that have this same error. I checked on the iPod lounge forum and I just couldn't count the number of users that had the same problem. There are just so many!
    I too have tried "5 r's" and I have also tried using a few "s" words and others...lol.
    It seems like there is no "fix" for this problem but I will say this: If there is no solution, then I will no longer be buying iPods. This is my third iPod that I have purchased. Which makes my Apple investment near the thousand dollar mark. That is way too much money spent to not have a functioning music player. I will be switching to another player to see if the grass is greener on the other side.
    I have been most dissappointed with this error and I will not be "recycling" this iPod for ten percent off of my next iPod purchase.

  • Error Message: "Disk could not be read from or written to".

    New 5th Gen. was downloading CD's I loaded into iTunes just fine; when uploading tunes into iPod yesterday this error message appeared: "Attempting to copy to the disk (iPod name) failed. Disk could not be read from or written to". Restored iPod with 1/10/06 update of iPod Install; using iTunes 6.0.2; operating system 10.3.9. Frustrated. iPod useless at this point. Anyone found a fix to this vexing problem?
    Thanks,
    John

    Thanks Jeff. Only thing that rings true is updating OS; when I tried to downoad 10.4 message said I 'could not on this computer'. Since I purchased and installed 10.3 a year ago I don't understand. Also, iPod was downloading perfectly until two days ago when -36 appeared. Bummer. I am not a techie, Apple tech support does not have a clue, and iPod is useless. Ideas?

  • "The disk could not be read from or written to"??

    When I try to sync my ipod it gives me following error message "Attempting to copy to the disk 'My Ipod' failed. The disk could not be read from or written to."
    Have not reset or restored it yet, wondering if there is anything I can do that doesn't involve me deleting all the songs on my ipod.
    5th Gen 80g Ipod, G5 Imac   Mac OS X (10.4.9)  

    See if this troubleshooting article helps.
    Disk cannot be read from or written to error syncing iPod in iTunes.

  • 9.1.1 sync problems: "The disk could not be read from or written to."

    Using OSX 10.6.3 and upgraded to iTunes 9.1.1. Once I did, I keep getting the following error message: "Attempting to copy to the disk [my ipod] failed. The disk could not be read from or written to." This is followed by another error message: "iTunes could not copy {name of file} to the iPod {iPod name} because the file could not be read or written."
    I tried deleting the files mentioned in the error message, but then the message returns with the name of a different file. At this rate, I'll be deleting all my files!
    I tried checking everything on the Knowledge Base article: http://support.apple.com/kb/HT1207
    I tried restoring my iPod (twice), but it didn't help.
    All my software is up to date. I haven't added any new software since I upgraded iTunes.
    NOW...when I try to sync my iPhone, I get the same error message.
    What's going on, and can anyone help?
    This is very annoying since I can't sync my iPhone which I need or my iPod which I would like.

    ArizonaDAK wrote:
    "iTunes could not copy {name of file} to the iPod {iPod name} because the file could not be read or written."
    check if you have read & write permissions for your iTunes music folder. in finder, right-click on it and +get info+. unlock the little padlock (you may have to enter your admin password) and change the permission settings. next, click on the little gear-shaped icon and +apply to enclosed items+ like so
    you may also give everyone read & write access. if this doesn't help, try the same on your iTunes folder (not just the iTunes music folder).
    if that make no difference, try reinstalling iTunes. click here and follow the instructions. next, download a fresh copy from here: http://www.apple.com/itunes/download/.
    you might also try to _*remove and reinstall the Apple Mobile Device Service*_
    JGG
    edited by the Jolly Green Giant (where Green stands for environmentally friendly)

  • Error: The disk ( my Ipod name here). Could not be read from or written to.

    I have a 5 gen Ipod 80 gig. Now I can sync music vids, photos, music just fine. I purchased bullet proof monk from the Itunes store a few days back and for some reason it will not sync onto my ipod. I get the above erroe message. I titled the thread after the error message.

    Have you had a chance to look at this troubleshooting page? It may be of some help: "Disk cannot be read from or written to" when syncing iPod

  • Ipod cannot be synced.  The disk could not be read from or written to.

    Help. For some reason my ipod connection makes itunes quit working. If I try to eject, this is the message I get. Message is in the "subject" above

    Take a look at this Apple KnowledgeBase article:
    "Disk cannot be read from or written to" when syncing iPod
    Hope it helps. Good luck.

  • Ipod cannot be updated the disk could not be read from or written to?

    So my iPod seems to be working fine except today when I plugged in I get the above error message?
    What's it mean and how do I fix it?

    Welcome to Apple Discussions!
    Have you seen if this Apple article about your issue is helpful? (linked below)
    "Disk cannot be read from or written to" when syncing iPod
    I hope this helps,
    -Kylene

  • Error when syncing iPod: The disk could not be read from or written to!!

    I have an iPod mini which worked fine on my Windows XP.
    Recently got Windows Vista and I downloaded iTunes and my put my music in the library.
    When I plugged my iPod into the Vista, it said it was syncing all the songs to my iPod.
    After about 3 hours, whilst syncing the last song a notice came up saying, 'Attempting to copy to the disk failed. The disk could not be read from or written to.'
    I restored my iPod and reinstalled iTunes but the same thing happend.
    I decided to plug my iPod back into the Windows XP, where I've had no problems. When I did this and started snycing all the songs, I got the notice come up again.
    'Attempting to copy to the disk failed. The disk could not be read from or written to.'
    I haven't been able to use my iPod now for about 5 weeks because I cannot solve the problem so any help will be much appreciated!
    Thanks

    You have posted in the Mac forum for problems & questions usting the iTunes store. You will probably find more help in the following forum.
    http://discussions.apple.com/forum.jspa?forumID=800

  • Songs won't update.  Error message "can not be read from or written to"

    Right, so maybe someone can help me.
    I've had my Nano since Christmas and have never encountered any problems with it until recently.
    Whenever I try and update my iPod (or my husband's for that matter) I get the error message: Attempting to copy to the disk "Gatsby" (name of my iPod) failed. The disk could not be read from or written to"
    Sometimes one or two songs will work, and then I'll get the message. If I try again another few songs will work and I'll get the message again.
    I have tried everything I can think of.
    I have tried resetting my iPod. I've tried reinstalling iPod Updater and iTunes. I've tried restarting the computer. I've tried restoring the iPod to factory settings. And I still have the same problem.
    I tried calling Apple Support but they weren't able to help me much. So maybe someone here has an idea. PLEASE HELP!
    Since I've restored the iPod I no longer have any songs on it. I only have the few that have managed to copy inbetween attempted updates. My poor little iPod is useless until I can fix this problem.
    I have iTunes v6.0.4 and iPod Updater v1.1.1 (the update from 2006-03-23)
    Please help!
    Thanks!
    iMac G5 1.8GHz PowerPC   Mac OS X (10.4.6)  

    Well, I know my operating system is up to date. I know iTunes is up to date. I know iPod Updater is up to date.
    I don't think it's a damaged music file, because it doesn't hang on one certain song. It manages to update a few, then I get the error, if I try and update again, it does a few more songs then I get the error again. I've updated dozens of times with the same selection of songs and I've never had a problem.
    I tried resetting the iPod. I tried restoring it.
    Still hasn't helped.
    Someone suggested using fsck from my terminal, but it came back saying everything appeared to be okay. But, my songs are all on my external hard drive, does that make a difference?
    It's never seemed to matter before.
    I don't know what else to try.
    I don't think it's a problem with the iPod itself. My husband's iPod is doing the same thing, which makes me wonder if it isn't my computer, or perhaps a problem with iTunes or the iPod Updater.
    I've tried using a different cable, and different ports, but I still have the same problem.
    Any ideas?

Maybe you are looking for

  • K7N2 Delta 2

    On a K7N2 Delta 2 series motherboard does anyone know how high of a cpu I can put in.right now I am running a Socket A Amd Sempron 2500+.but I cant find the highest cpu it will run on.

  • Is it normal to have to continually check to see if I am connected to the internet?

    I use a MacBook Pro with system 10.7.5 and I just purchased my Airport Extreme after my Airport Express died after about 4 years of use.  Yes, I do get more speed when I am on the internet, or at least it feels that I do, but I would happily trade th

  • HT204387 can I use a Motorola Bluetooth earphone with my iPad2

    CanI use my Bluetooth earphone with my iPad 2?

  • SQL Server TG Query Optimization

    We are using Oracle Transparent Gateway 9.0.1.1.1 to connect an Oracle (Windows 2000) 9.1.7.4.0 database to a SQl Server 2000 SP2 database. When we use two simple queries to retrieve information from the gateway, the data is returned with a response

  • Using Isolation Level Serialazable

    I use Visual Basic/Windows Forms to create my project I have my form for amending orders ready. The flow is: Get order number Open connection sqlcommand to check if order number exists if not, return Set isolation level serialazable Get response to "