I gota BYTE* buffer, which contains the contents of a file.

Problem is when I want to output the contents of the buffer, into a new file (copy).
I need to retrieve the size of the BYTE* buffer, and casting it to char* and using strlen() doesn't work since it breaks on EOF-bytes, which there sometimes are in files.

Any solutions?