rsrc

package
v0.0.0-...-43d74b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IconResource        = 3
	IconGroupResource   = 14
	VersionInfoResource = 16
	ManifestResource    = 24
)

Common resource types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	common.Blob
	// contains filtered or unexported fields
}

Data represents actual binary resource data in .rsrc section.

type DataEntry

type DataEntry struct {
	// contains filtered or unexported fields
}

DataEntry is a header for Data.

type Directory

type Directory struct {
	// contains filtered or unexported fields
}

Directory is the main structure for .rsrc section that can hold subdirectories or data.

type DirectoryEntry

type DirectoryEntry struct {
	// contains filtered or unexported fields
}

DirectoryEntry is a header for Directory.

type Relocation

type Relocation struct {
	// contains filtered or unexported fields
}

Relocation represents a relocation in .rsrc section.

func (*Relocation) VirtualAddress

func (r *Relocation) VirtualAddress() uint32

VirtualAddress returns a virtual address where the relocation should be applied to.

type Section

type Section struct {
	// contains filtered or unexported fields
}

Section represents the .rsrc section in PE file.

func New

func New() *Section

New returns an empty .rsrc section.

func (*Section) AddResourceByID

func (s *Section) AddResourceByID(typ, id int, blob common.Blob) error

AddResourceByID adds resource blob with arbitrary type identified by an integer id into the section.

func (*Section) AddResourceByName

func (s *Section) AddResourceByName(typ int, name string, blob common.Blob) error

AddResourceByName adds resource blob with arbitrary type identified by a name into the section.

func (*Section) Name

func (s *Section) Name() string

Name returns the section's name, ".rsrc".

func (*Section) Relocations

func (s *Section) Relocations() []coff.Relocation

Relocations returns relocations that should be applied to the section.

func (*Section) ResourceIDExists

func (s *Section) ResourceIDExists(id int) bool

ResourceIDExists returns true if a resource with given integer id exists.

func (*Section) ResourceNameExists

func (s *Section) ResourceNameExists(name string) bool

ResourceNameExists returns true if a resource with given name exists.

func (*Section) Size

func (s *Section) Size() int

Size returns the section's size.

func (*Section) WriteTo

func (s *Section) WriteTo(w io.Writer) (int64, error)

WriteTo writes section data to w.

type String

type String struct {
	// contains filtered or unexported fields
}

String holds a resource string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL