So basically I wish to write a byte array to a file, however the program crashes.
Unhandled exception at 0x7766DEE1 (KernelBase.dll) in append.exe: 0xC0000005: Access viola
The argument passed to WriteFile used to store the number of bytes written (at) can only be null if the argument for the overlapped structure is not null. I suggest changing at to be a DWORD and pass a pointer to it.