Yes, yet another duplicated StrRetToStr function: COMDLG32_StrRetToStrNW in dlls/commdlg/filedlgbrowser.c. At least this time it says that it's a copy. I guess it would be better if the implementations were pointing to each other. It would at least make it easier to maintain.
But this case is not as easy as the shell32 case: * first the implementation is slightly different: the SHFree is not commented out in this one. I don't think the difference is intentional. So who is right?
* commdlg is not supposed to import shell32. But it already imports a couple of other functions from shell32 so why not this one? It would be better than have another inconsisten implementation.
* except that StrRetToStrNW is not exported. It is StrRetToStrN which is exported. So is it ok to call StrRetToStrN? Is StrRetToStrNW really more correct?
Well, here is a proposed patch that imports StrRetToStrN from shell32 via the already-in-place GPA mechanism and removes COMDLG32_StrRetToStrNW.
Comments?
-- Francois Gouget fgouget@free.fr http://fgouget.free.fr/ La terre est une bêta...