mirror of
https://github.com/modernw/App-Installer-For-Windows-8.x-Reset.git
synced 2026-04-24 12:00:24 +10:00
Update Settings Shell.
This commit is contained in:
@@ -118,9 +118,21 @@ public ref class _I_Resources
|
||||
String ^GetFromOthers (String ^filepath, unsigned int resid)
|
||||
{
|
||||
HMODULE module = nullptr;
|
||||
if (filepath && IsNormalizeStringEmpty (MPStringToStdW (filepath))) module = GetModuleHandleW (MPStringToStdW (filepath).c_str ());
|
||||
bool needrel = false;
|
||||
if (filepath && !IsNormalizeStringEmpty (MPStringToStdW (filepath)))
|
||||
{
|
||||
HMODULE hRes = LoadLibraryExW (
|
||||
MPStringToStdW (filepath).c_str (),
|
||||
NULL,
|
||||
LOAD_LIBRARY_AS_DATAFILE | LOAD_LIBRARY_AS_IMAGE_RESOURCE
|
||||
);
|
||||
needrel = hRes;
|
||||
module = hRes;
|
||||
}
|
||||
else module = GetModuleHandleW (NULL);
|
||||
return GetRCStringCli (resid, module);
|
||||
auto ret = GetRCStringCli (resid, module);
|
||||
if (needrel && module) FreeLibrary (module);
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user