Update Settings Shell.

This commit is contained in:
Bruce
2025-11-29 23:02:15 +08:00
parent cf50b09bf0
commit 5796fb40e1
41 changed files with 515 additions and 383 deletions
+1
View File
@@ -925,6 +925,7 @@ public ref class _I_Path
void set (String ^dir) { SetCurrentDirectoryW (MPStringToStdW (dir).c_str ()); }
}
property String ^Program { String ^get () { return CStringToMPString (GetCurrentProgramPathW ()); } }
property String ^Root { String ^get () { return CStringToMPString (GetFileDirectoryW (GetCurrentProgramPathW ())); }}
String ^Combine (String ^l, String ^r) { return CStringToMPString (CombinePath (MPStringToStdW (l), MPStringToStdW (r))); }
String ^GetName (String ^path)
{
+2 -2
View File
@@ -169,12 +169,12 @@ public ref class _I_Bridge_Base
{
protected:
_I_String ^str = gcnew _I_String ();
_I_Package ^pkg = gcnew _I_Package ();
_I_InitConfig ^initconfig = gcnew _I_InitConfig ();
_I_Storage ^storage;
public:
property _I_String ^String { _I_String ^get () { return str; }}
property _I_Package ^Package { _I_Package ^get () { return pkg; }}
property _I_InitConfig ^Config { _I_InitConfig ^get () { return initconfig; }}
property _I_Storage ^Storage { _I_Storage ^get () { return storage; }}
};
[ComVisible (true)]
public interface class IScriptBridge
+14 -2
View File
@@ -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