XLL+ Class Library (7.0)

::ResGetLangIDFromCountryCode

Searches for a resource whose language matches the country code

LANGID ResGetLangIDFromCountryCode(
   HINSTANCE hinst,
   int cc
);

Parameters

hinst

Module handle of a resource file.

cc

A numeric country code, normally corresponding to the international telephone dialling code for the country.

Return Value

The language ID of a resource in the main language of the country, if found. If no such resource is found, then the next best matching language ID is returned. If no match is found, then MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL) is returned.

Remarks

This function iterates through all the resources, of any type, in the resource file until it finds a resource in a language whose country code is cc, (as returned by ResGetCountryCodeFromLangID()).

This function is used by XllGetExcelLanguage() to translate the Excel version's country code to a language ID.

Requirements

Header: xllres.h

See Also

Global resource functions