This issue is with the LAZ library project. After compiling the DLL, when the host program loads the DLL.
When creating BitmapFromResourceName to search for resources, 0 is passed in, and the exe host program that loads the DLL is used to search for resources.
If the passed in 0 is replaced with the current DLL module handle HINSTANCE, this problem can be solved. That is to search for this resource in the DLL
I found it impossible to set this HINSTANCE externally, nor can I rewrite functions related to it.
`You can install that on top of the Laz version.` What does it mean?
function CreateCheckImageList(CheckKind: TCheckImageKind): TImageList;
{$IF LCL_FullVersion >= 2000000}
var
bm: TCustomBitmap;
resName: String;
{$ENDIF}
begin
Result := TImageList.Create(nil);
Result.Height := 16;
Result.Width := 16;
{$IF LCL_FullVersion >= 2000000}
Result.RegisterResolutions([16, 24, 32]);
Result.Scaled := true;
resname := BuildResourceName(CheckImagesStrings[CheckKind]);
bm := CreateBitmapFromResourceName(HINSTANCE, resname);
try
bm.Transparent := true;
Result.AddSliced(bm, 25, 1);
finally
bm.Free;
end;
{$ELSE}
Result.AddResourceName(0, CheckImagesStrings[CheckKind], clFuchsia);
{$IFEND}
end;