-
EOF Char
hi all ,
back once again .
well i am writting a protocol analyser and
i have a file where there is an EOF file character probably in the file like ""
Data Follows
2ÿSMBsÈÿþHÿ2
®Ô€÷NTLMSSPn†
@J
now when i am reading the file with fgets or file.readstring or whatever .... the file is closed at this point "" because of the eof file character ... could any one please tell me how do i avoid my program to read it lamelly without treating as a "EOF" rather as a character and moreover i believe it's ascii value is somewhere less then 0 or 0 to be exact ..now how do i rectify it .
thanx
-
If you opened the file with CreateFile(), then use GetFileSize(), allocate memory for this size and read the whole file to the memory block with ReadFile().
If using fopen(), are you opening a binary file in text mode, or text file in binary mode, as that may be your problem.
-
thanx a zillion tons ..dude
love you
vicks