Thank you. Hope it will be better this time. Also, I'll send a test if this is OK.
This one looks pretty good to me, but I have one error and a few nits to correct:
The error: + { + ERR("GetLocaleInfo of 0x%x failed in 2nd stage?!\n", localeValue); + SysFreeString(*pbstrOut);
You should set *pbstrOut to NULL in this case.
The nits: You have a couple small errors in the comments: - You misspell iWeekday - The comment for iWeekday in the params section implies 0 is allowed, but the first check in the function disallows it.
You also inconsistently put spaces after commas - please do in all cases.
Attaching a test with the patch would certainly help.
--Juan