Article View: borland.public.cppbuilder.nativeapi
Article #3487FAT32 is my problem
From: Babak
Date: Sat, 03 Jun 2006 19:31
Date: Sat, 03 Jun 2006 19:31
29 lines
1889 bytes
1889 bytes
Hi
when I was programming under DOS and FAT16 I was using this code to read
sectors and store them into a file for future needs, now my partition are
FAT32 and I stuck in Microsoft Windows , Although I am using both 98 and XP
but I have problem in both.
My problem is I cant use absread() and abswrite() anymore, I dont know any
function for my aim,...
If anyone can help me to change this source code to a code that BCB5 could
compile and I can use it for FAT32, please tell me , thanks a milion :-)
#include "stdio.h"
#include "stdlib.h"
#include "conio.h"
#include "dos.h"
#define SECTORS_PER_READ 16
#define END_SECTOR 1000
void main(void){
int i, strt, ch_out, start_sector=0;
char buf[512*SECTORS_PER_READ];
if (absread(2, SECTORS_PER_READ, start_sector, &buf) != 0){
perror("Read ABS from Disk Problem! Program Exit !");
exit(1);
}
printf("Reading OK and going on...\n");
for (i=0; i<END_SECTOR; i++){
//do something like store in a file
}
}
Technical Details
Message-ID:
<4481f29e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a4bb98059ad52ee4,start X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Babak" <I-afraid@spam.net> Newsgroups: borland.public.cppbuilder.nativeapi Subject: FAT32 is my problem Date: Sun, 4 Jun 2006 00:01:16 +0430 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2479.0006 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006 NNTP-Posting-Host: 85.185.142.39 Message-ID: <4481f29e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1149366942 85.185.142.39 (3 Jun 2006 13:35:42 -0700) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!news.glorb.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!194.25.134.62.MISMATCH!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail