What do you think about this version?
Better, but still not correct: + ret = DlgDirSelectExA( WIN_Handle32(hwnd), buffer, MAX_PATH, id ); + if (GetLastError() == 0) GetShortPathNameA(buffer, str, len);
You shouldn't check GetLastError() for whether DlgDirSelectExA succeeded. Rather, just check ret. You have the same problem in DlgDirSelectComboBoxEx16. --Juan