1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| struct TLibModuleX
{
TLibModuleX* Next;
HINSTANCE Instance;
HINSTANCE CodeInstance;
HINSTANCE DataInstance;
HINSTANCE ResInstance;
HINSTANCE Reserved;
};
void __fastcall TForm18::ChangerLangue(AnsiString langue)
{
TLibModuleX* module = (TLibModuleX*)LibModuleList;
while (module != NULL)
if (HInstance == module->Instance)
{
if ((module->ResInstance != HInstance) && (module->ResInstance != NULL))
FreeLibrary(module->ResInstance);
AnsiString nomModule = ChangeFileExt(ParamStr(0), "." + langue);
module->ResInstance = LoadLibrary(nomModule.c_str());
break;
}
else
module = module->Next;
} |
Partager