AK> VN> Is Possible whether in C reading more 64K from file (is necessary
AK> VN> 12-13 Mb)? How this is to do? Thank you.
AK>I think I sure %subj% is impossible if you're writing for DOS.
AK>'Cos C uses DOS service (int 21h) whitch CANNOT read more than 64k at
AK>a time. UC this is because of restrictions ``unsigned int'' type.
The following reports the size (+1) of "C:\tc\bin\tc.exe" in DOS,
compiled under Turbo C++ v3.0:
// begin code
#include
int main (void)
{
FILE* FInput;
long lCounter;
char cTemp;
lCounter=0;
FInput=fopen ("C:\\tc\\bin\\tc.exe","rb");
if (FInput==NULL) return 1;
while (!feof(FInput))
{
fread (&cTemp,1,1,FInput);
lCounter+=1;
}
printf ("\n There were %ld items read. \n",lCounter);
return 0;
}
// end code
___
þ SLMR 2.1a þ All hope abandon, ye who enter messages here.
--- Maximus 3.01
---------------
* Origin: C+Net BBS. Programming & Networking. (1:342/1017)
|