Callback function for searching language sections in the EXE string block
| 88 | |
| 89 | // Callback function for searching language sections in the EXE string block |
| 90 | BOOL CALLBACK EnumLangsCallback(HMODULE hModule, LPCTSTR lpType, LPCTSTR lpName, WORD wLang, LONG_PTR lParam) { |
| 91 | auto* pList = reinterpret_cast<std::vector<LanguageOption>*>(lParam); |
| 92 | |
| 93 | // Exclude duplicates when scanning String Table blocks |
| 94 | for (const auto& item : *pList) { |
| 95 | if (item.langID == wLang) return TRUE; |
| 96 | } |
| 97 | |
| 98 | LanguageOption opt; |
| 99 | opt.langID = wLang; |
| 100 | // Extract language names |
| 101 | opt.name = theApp.GetStringForLang(hModule, IDS_LANGUAGE_NAME, wLang); |
| 102 | |
| 103 | if (!opt.name.IsEmpty()) { |
| 104 | pList->push_back(opt); |
| 105 | } |
| 106 | return TRUE; |
| 107 | } |
| 108 | |
| 109 | // Scan EXE resources for translated sections |
| 110 | void CcppcryptfsApp::ScanResourcesForLanguages() { |
nothing calls this directly
no test coverage detected