ImageEn, unit hyieutils

TIEResourceExtractor

Properties · Methods · Demos · Examples

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

Examples


// Extract the first icon in Windows Explorer
re := TIEResourceExtractor.Create('C:\Windows\Explorer.exe');
try
  buffer := re.GetBuffer( 'Icon', 'INTRESOURCE:1', bufferLen );
  ImageEnView1.IO.Params.IsResource := True;
  if ImageEnView1.IO.LoadFromBuffer( buffer, bufferLen ) then
    ImageEnView1.IO.SaveToFile( 'D:\Explorer.ico' );
finally
  re.Free;
end;




// Load resource 143 in "Bitmap" from current application
var
  re: TIEResourceExtractor;
  buffer: pointer;
  bufferLen: integer;
begin
  re := TIEResourceExtractor.Create( Application.ExeName );
  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


Properties
Public Property  FriendlyTypes
Public Property  GroupCountFrames
Public Property  GroupFrameDepth
Public Property  GroupFrameHeight
Public Property  GroupFrameName
Public Property  GroupFrameWidth
Public Property  IsGroup
Public Property  IsGrouped
Public Property  IsValid
Public Property  Names
Public Property  NamesCount
Public Property  ResourceTypes
Public Property  TypesCount
Public Property  Types

Methods
Public Method  Create
Public Method  GetBuffer
Public Method  GetFrameBuffer
Public Method  GetGroupAndFrame
Public Method  GetResourceBookmark
Public Method  IndexOfType


See Also

LoadFromResource
LoadFromResource
LoadFromResource