Search code examples
winapiunicodeansi

Why this function has both Unicode and ANSI versions?


Why does EndUpdateResource have both Unicode and ANSI versions?


Solution

  • Because BeginUpdateResource has (due to its LPCTSTR parameter), and the handles produced by the two versions may need different internal clean-up. (Even if they don't today, a prudent API designer will leave open the possibility that they may tomorrow).