Problem is when I call my program passing in filenames, the filenames passed in are the dos 8:3 format and not the long format.
Your C++ compiler does not support long file names/is configured incorrectly. You need to compile your program as Win32 Console (I guess you are using Windows)
Some DOS-compilers also support long file names. Don't ask me, I am trying to forget DOS completely... (extended memory, high memory, base memory, eaarghh