|
-
Dec 1st, 2001, 08:45 PM
#1
Thread Starter
Lively Member
Readfile
i used ReadFile and it returned ok and the number of bytes read is the size of the file but when i debug and look at what the buffer is it is only the first 3 bytes of the file and the length is 3. does anyone know why. the buffer is being allocated enough memory so that's not the problem.
-
Dec 1st, 2001, 09:16 PM
#2
IF you did something like this:
[code]
unsigned char bBytes[100];
z=ReadFile( hOrgFile, &bBytes[1], sizeof(bBytes), Ret, 0L)
[/code
compare ret and sizeof(bBytes) after the call. If they are not the same then an error condition exists - like EOF encountered.
-
Dec 2nd, 2001, 09:10 AM
#3
Monday Morning Lunatic
Just out of interest, why are you ignoring the first byte in the buffer? Surely just bBytes would be more logical?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|