MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / EnumLangsCallback

Function EnumLangsCallback

cppcryptfs/cppcryptfs.cpp:90–107  ·  view source on GitHub ↗

Callback function for searching language sections in the EXE string block

Source from the content-addressed store, hash-verified

88
89// Callback function for searching language sections in the EXE string block
90BOOL 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
110void CcppcryptfsApp::ScanResourcesForLanguages() {

Callers

nothing calls this directly

Calls 1

GetStringForLangMethod · 0.80

Tested by

no test coverage detected