uses Types;
function EnumResTypeProc(hModule: THandle; lpszType: PChar; lParam: Integer): LongBool;
StdCall;
var
arr: ^TStringDynArray
absolute lParam;
begin
SetLength(arr^, Length(arr^) + 1);
if Cardinal(lpszType) > $FFFF
then arr^[High(arr^)] := lpszType
else arr^[High(arr^)] := Format('
#%d', [Integer(lpszType)]);
Result := True;
end;
function EnumResNameProc(hModule: THandle; lpszType, lpszName: PChar; lParam: Integer): LongBool;
StdCall;
begin
TMemo(lParam).Lines.Add(lpszType + '
' + lpszName);
Result := True;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
h: THandle;
i: Integer;
ResTypes: TStringDynArray;
begin
h := HInstance;
// hier dein DLL-Handle setzen
EnumResourceTypes(h, @EnumResTypeProc, Integer(@ResTypes));
for i := 0
to High(ResTypes)
do
EnumResourceNames(h, PChar(ResTypes[i]), @EnumResNameProc, Integer(Memo1));
end;