I don't understand what you try to do with strFile.
First you reserve space for 512 characters, then you append the filetitle.