Yes I understood that the first time. But us szTitlef double NULL terminated? You can double NULL terminate a string by appending "\0\0", for example;
char buffer[] = "D:\\Temp";
int len = strlen(buffer);
char* folderName = new char[len+2];
strcpy(folderName, buffer);
folderName[len] = '\0';
folderName[len+1] = '\0';
Did you checked what GetLastError returns?
-Saurabh