Your C application is trying to open a serial port to talk to the Arduino, in write-only mode. Any other application that tries to use the same serial port must either be closed or assured to not have the serial port open. That means that the Serial Monitor MUST be closed, and the IDE can not be trying to upload code to the Arduino at the same time.
You do not show the actual output that you get from the program, but you do mention a "Write Error". So, I'll assume, for now, that the C application was successful at opening the serial port.
You really should show EXACT output, where possible, rather than waving your arms so much.
Now, operating on the assumption that the C application did open the serial port, this causes the Arduino to reset, unless you have modified the Arduino to not reset on serial connections. You haven't mentioned doing this, so I'll assume that you haven't. Notice that this is now the second assumption I've had to make.
You then begin flooding the Arduino with input. Or, you try to.
Section 4 of the document you linked to shows how to create an array to contain data read from the Arduino. It mentions that writing is exactly the same, except for using WriteFile instead of ReadFile. That is, the arguments to both functions is exactly the same. The difference is that one function will read from the array and write to the serial port (WriteFile) while the other will read from the serial port and write to the array (ReadFile).
Your call to WriteFile does not include an array as one of the arguments. The compiler warned you that this was likely wrong, but you chose to ignore the warning. When you supply an argument to a C function, that argument is passed to the function either by-value or by-reference. Simple types are passed by value. Complex types are passed by reference. Arrays are complex types, so they are passed by reference.
Now, what this means is this. The 3rd argument is the size of the array. You supply a 1, which the compiler makes a copy of, in the call to the function. This is pass-by-value. The actual value is copied.
The 2nd argument, on the other hand, is an array of data to write. Since the argument is a complex type, it is passed be reference. This means that what you are supplying is the address where the data is. If you create an array, and put some data in that array, and then tell the function where the array is, in memory, it can get the data. This is a pass-by-reference. You are simply telling the function where the data is, rather than copying the data for the function to use.
Now, you told the compiler that the data to pass was at address 123. Do you think you have read access to data at that address? No, of course you don't. Low addresses like that are for the OS to use, not your application.
Now, if you follow directions, and create an array, instead, with some data in it, the address of the array will be used (automatically).
But, you will still have a problem. Whatever data is in that array will be written to the Arduino over and over, with no delay. This will very quickly swamp the Arduino's serial buffer, and data will soon be lost.
The Arduino reads one character from the serial buffer, after it finishes booting. For every character read, it writes 29 characters back to the serial port ("This is what you entered: ", the character read, a carriage return, and a line feed).
The C application is not configured to read from the serial port, and there is no code to do so, so why you are writing anything to the serial port is a mystery.