Simon Mourier's Avatar
Simon Mourier's blog (1349 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • atl
  • c/c++
  • com
  • winapi

How to call GetAltMonthNames to fill a safe array of foreign locale month strings?

Jun 11, 2019 See the question and my original answer on StackOverflow

Your first code is ok but there's no alternate names for German language defined. Try Polish:

LPOLESTR* rgp;
if (SUCCEEDED(GetAltMonthNames(1045, &rgp)))
{
    int i = 0;
    while (rgp[i])
    {
        wprintf(L"%s\n", rgp[i++]);
    }
}

Documentation says:

Useful for Hijri, Polish and Russian alternate month names.

  • SmoBlog © 2010-2025 Simon Mourier. All rights reserved.
  • Privacy & Terms