I want to create a patch for the problem I reported as RSP-30853
In short, after loading my resouce DLL's I need to call sysutils.ResStringDeleteAllModules
in order to flush the cached resource strings. Unfortunately this routine is NOT in the interface
section, and modifying and recompiling sysutils.pas
itself won't do it for me as I use runtime packages.
So I'm looking for a more-or-less hacky way to call this. I tried but did not find a route through TRTTIContext.
I also Tried this (with a fallback to LoadResStringFunc=nil
for my specific problem) but to no avail:
procedure DropResStringCache;
begin
var PModule:=LibModuleList;
var P:=nil;
while Assigned(PModule) do
begin
P:=GetProcAddress(PModule^.Instance,'ResStringDeleteAllModules');
if Assigned(P) then
break;
PModule:=PModule.Next;
end;
if Assigned(P) then
TProcedure(P)()
else LoadResStringFunc:=nil;
end;