Quote Originally Posted by hi1 View Post
...Besides, i don't think that fwrite can know the actual buffer size and make an internal check, since it receives just a pointer to the buffer.
Right. But it WILL cause access violation trying to copy the stuff that is not there, and will catch the exceprion.