MCPcopy Create free account
hub / github.com/TortoiseGit/TortoiseGit / LoadLangDll

Function LoadLangDll

src/TortoiseShell/ShellExt.cpp:61–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void LoadLangDll()
62{
63 if (g_langid != g_ShellCache.GetLangID() && (g_langTimeout == 0 || g_langTimeout < GetTickCount64()))
64 {
65 g_hResInst = g_hmodThisDll; // reset to English defaults, because CLangDll.Init() unloads the DLL
66 if (HINSTANCE hInst = g_langDll.Init(L"TortoiseProc", g_hmodThisDll, g_ShellCache.GetLangID()); hInst)
67 {
68 g_hResInst = hInst;
69 g_langid = g_langDll.GetLoadedLangId();
70 g_langTimeout = 0;
71 return;
72 }
73
74 // either the dll for the selected language is not present, or
75 // it is the wrong version.
76 // fall back to English and set a timeout so we don't retry
77 // to load the language dll too often
78 g_hResInst = g_hmodThisDll;
79 g_langid = CLangDll::s_defaultLang;
80 // set a timeout of 10 seconds
81 if (g_ShellCache.GetLangID() != CLangDll::s_defaultLang)
82 g_langTimeout = GetTickCount64() + 10000;
83 } // if (g_langid != g_ShellCache.GetLangID())
84}
85
86STDMETHODIMP CShellExt::QueryInterface(REFIID riid, LPVOID FAR *ppv)
87{

Callers 6

AddPagesMethod · 0.85
QueryDropContextMethod · 0.85
QueryContextMenuMethod · 0.85
GetCommandStringMethod · 0.85
HandleMenuMsg2Method · 0.85
CShellExtMethod · 0.85

Calls 3

GetLangIDMethod · 0.80
GetLoadedLangIdMethod · 0.80
InitMethod · 0.45

Tested by

no test coverage detected