This goes back to your other discussion thread 'TCHAR correct usage'. Why are you using StringVector as a function argument when you are only returning a single name? As per the other thread, why not use string& dir as a function parameter?