mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 11:49:27 +02:00
* code simplified
git-svn-id: trunk@1167 -
This commit is contained in:
parent
cde3b119ef
commit
6863cb00df
@ -34,7 +34,7 @@ type
|
||||
reshash: longint; // always 32bit, contains an ELF hash of the resource entries name
|
||||
restype: longint; // always 32bit, contains the resource type ID compatible with Windows RES IDs
|
||||
ptr: pointer; // Memory pointer to the reosource
|
||||
name: string; // String containing the name of the resource
|
||||
name: ansistring; // String containing the name of the resource
|
||||
size: longint; // The size of the resource entry - 32/64 Bit, depending on platform
|
||||
end;
|
||||
PFPCRuntimeResourceInfo = ^TFPCRuntimeResourceInfo;
|
||||
@ -83,11 +83,12 @@ begin
|
||||
FPCRuntimeResourceInfoArray:=GetMem(SizeOf(TFPCRuntimeResourceInfo)*ResInfoCount);
|
||||
for i:=0 to ResInfoCount-1 do
|
||||
begin
|
||||
CurrentResource:=pFPCResourceInfo(pointer(longint(FPCResourceSectionLocation^.reshash.ptr)+i*sizeof(TFPCResourceInfo)));
|
||||
CurrentResource:=pFPCResourceInfo(pointer(FPCResourceSectionLocation^.reshash.ptr+i*sizeof(TFPCResourceInfo)));
|
||||
FPCRuntimeResourceInfoArray[i].reshash:=CurrentResource^.reshash;
|
||||
FPCRuntimeResourceInfoArray[i].restype:=CurrentResource^.restype;
|
||||
FPCRuntimeResourceInfoArray[i].ptr:=pointer(longint(CurrentResource^.ptr)+longint(FPCResourceSectionLocation^.resdata.ptr));
|
||||
FPCRuntimeResourceInfoArray[i].name:=pchar(pointer(longint(CurrentResource^.name)+longint(FPCResourceSectionLocation^.ressym.ptr)));
|
||||
FPCRuntimeResourceInfoArray[i].ptr:=pointer(CurrentResource^.ptr)+PtrInt(FPCResourceSectionLocation^.resdata.ptr);
|
||||
FPCRuntimeResourceInfoArray[i].name:=pchar(CurrentResource^.name)+PtrInt(FPCResourceSectionLocation^.ressym.ptr);
|
||||
writeln(FPCRuntimeResourceInfoArray[i].name);
|
||||
FPCRuntimeResourceInfoArray[i].size:=CurrentResource^.size;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user