ImageEn, unit hyieutils

TIEResourceExtractor


Declaration

TIEResourceExtractor = class;


Description

A class to extract resources from a PE files like EXE, DLL, OCX, ICL, BPL, etc..
Supported resources include Icons, Bitmaps, Cursors and other image resources.


Demo

Demo  Demos\InputOutput\ResourceLoader\ResourceLoader.dpr


Example

// Load resource 143 in "Bitmap" from "explorer.exe" (should be a little Windows logo)
var
  re: TIEResourceExtractor;
  buffer: pointer;
  bufferLen: integer;
begin
  re := TIEResourceExtractor.Create('explorer.exe');
  try
    buffer := re.GetBuffer('Bitmap', 'INTRESOURCE:143', bufferLen);
    ImageEnView1.IO.Params.IsResource := true;
    ImageEnView1.IO.LoadFromBuffer(buffer, bufferLen, ioBMP);
  finally
    re.Free;
  end;
end;


Methods and Properties

Public Method  Create
Public Property  FriendlyTypes
Public Method  GetBuffer
Public Method  GetFrameBuffer
Public Method  GetGroupAndFrame
Public Method  GetResourceBookmark
Public Property  GroupCountFrames
Public Property  GroupFrameDepth
Public Property  GroupFrameHeight
Public Property  GroupFrameName
Public Property  GroupFrameWidth
Public Method  IndexOfType
Public Property  IsGroup
Public Property  IsGrouped
Public Property  IsValid
Public Property  Names
Public Property  NamesCount
Public Property  TypesCount
Public Property  Types