-
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.
-
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.
-
Just out of interest, why are you ignoring the first byte in the buffer? Surely just bBytes would be more logical? :confused: