Showing results for April 4, 2013 - The Old New Thing

Apr 4, 2013
Post comments count0
Post likes count0

Don’t forget, the fourth parameter to ReadFile and WriteFile is sometimes mandatory

Raymond Chen
Raymond Chen

The Read­File and Write­File functions have a parameter called lp­Number­Of­Byte­Read, which is documented as __out_opt LPDWORD lpNumberOfBytesRead, // or __out_opt LPDWORD lpNumberOfBytesWritten, "Cool," you think. "That parameter is optional, and I can safely pass NULL." My program runs fine if standard output ...

Code