Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 927 Bytes

File metadata and controls

40 lines (26 loc) · 927 Bytes

BytecodeApi.PEResources

Library for reading of native resources of executables & DLL files.

Examples

BytecodeApi.PEResources

ResourceFileInfo

A ResourceFileInfo represents an executable or DLL file that contains resources.

ResourceFileInfo resourceFile = new(@"C:\Windows\explorer.exe");

// Retrieve resource as byte[]:
byte[] rcData1 = resourceFile.GetResource(ResourceType.RCData, 101);

// Retrieve icon groups:
int[] iconNames = resourceFile.GetGroupIconResourceNames();
Icon[] icons = iconNames.Select(name => resourceFile.GetGroupIconResource(name)).ToArray();

Modify the resources of the file:

// Change executable icon:
resourceFile.ChangeIcon(new Icon(@"C:\path\to\icon.ico"));

// Strip all resources:
resourceFile.DeleteResources();

Changelog

3.0.0 (08.09.2023)

  • Initial release