Visual Studio Code – Opening a file with CreateFile() returns invalid handle with error code 183
I'm trying to open an existing file and write its content to a newly created file as a stream: #include <Windows.h> #include <stdio.h> #define BUFFER_LENGTH 2048 int main(void) { BYTE buffer[BUFFER_LENGTH]; DWORD readCount; // Program breaks here. HANDLE hReadFile =…