I am following this sample, compiles fine and runs fine, i have encrypted a file with a password, upon using decrypt testEnc.exe testDec.exe , the encrypted file is 1kb, i have a cmd prompt elivated with admin rights so there is no issue with file operation apis, does anyone know what the problem is?

the site is

Example C Program: Decrypting a File (Windows)