LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I write and read byte by byte at one choosen sector on my HDD

I like to read out sector by sector of my cf-card which is read like a hard disk. But I can't use the file I/O functions because the wanted informations are not in a file structur or partitions.
So is there are any possibility to read out all 512 bytes of an addressed sector (using LBA mode).
0 Kudos
Message 1 of 4
(2,802 Views)
The file functions are built into the OS. That is why you cannot read the data from the hard drive any way you want. Can you reference the cf-card by a memory address? If so you can use the inport/output functions to get the data. Also if you have the functions in C, you can build them into a dll and call that code from LabVIEW's call library node. This is probably the nicest solution if you have the code already.
0 Kudos
Message 2 of 4
(2,802 Views)
On a Win32 system the name of the physical drive is \\.\PHYSICALDRIVEx where x is the number of the drive with counting start by zero. If you want to read the partition it is \\.\C: for your partition C.

It could be that the LV File I/O functions will not allow you to use such a file name. Then you have to use the Win API functions which are desribed in the MSDN.

The numbering of your drives depends on the buses you have the drives on. Normally 0 and 1 are the Floppy drives, then come the SCSI drives, then EIDE drives. If you are not sure which drive your cf-card is use the drive manager. It will show you the drive numbers along with the partition
s on it.

Waldemar
Waldemar

Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
Don't forget to give Kudos to good answers and/or questions
0 Kudos
Message 3 of 4
(2,802 Views)
Thanks a lot for response.
I'll try both ways but may the best will be by using API-functions.
Once again Thanks
Wolfgang
0 Kudos
Message 4 of 4
(2,802 Views)