We (mistakenly) used StringCbPrintfW to write a database query which failed miserably on any locale that uses a comma as the decimal separator. Fix is easy enough, right? StringCbPrintf_lW, which takes a locale, is also defined in strsafe.h. Both are defined under:
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
so just create the locale and replace StringCbPrintfW with StringCbPrintf_lW.
Intellisense is happy, GoToDefinition is happy, ClCompile is not. I keep getting
error C3861: 'StringCbPrintf_lW': identifier not found
Any ideas what is wrong?
The header Strsafe.h defines the method in question, using two defines to filter this function as follows:
In short, you need to define
STRSAFE_LOCALE_FUNCTIONSbefore you include the header. As in: