I just pushed a new patch with two changes:
- Use wcslen, wcscat, wcsdup, and wcschr instead of lstrlenW, lstrcatW, strdupW, and StrChrW in new code (to take advantage of compiler optimizations). - Move allocation and path combination from get_programs_path to sanitize_and_combine and rename it to combine_path with a 'BOOL sanitize' argument.
I think the patch looks quite a bit nicer with those changes. Please let me know what else to do.