By the way, filename is a variable length array. Is that intended?
Not really. I didn't realize it was variable length, that's why I made it as long as the string put in the input buffer using "strlen()". I thought I was being more efficient, but in retrospect its probably rather superfluous
"IBS" is infact, "Input Buffer Size".
Is "MAX_PATH" some kind of standard size to store a filename?