resource

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataEntry

type DataEntry struct {
	OffsetToData uint32
	DataSize     uint32
	CodePage     uint32
	Reserved     uint32
}

DataEntry stores the offset to the resource data.

func (DataEntry) Size

func (e DataEntry) Size() int

Size returns the size in bytes of the resource data.

type Directory

type Directory struct {
	Characteristics    uint32
	Timestamp          uint32
	Major              uint16
	Minor              uint16
	NumberNamedEntries uint16
	NumberIDEntries    uint16
}

Directory represents the layout of the resource directory.

func (Directory) Size

func (d Directory) Size() int

Size returns the size in bytes of the resource directory.

type DirectoryEntry

type DirectoryEntry struct {
	Name         uint32
	OffsetToData uint32
}

DirectoryEntry defines the entry in the directory table.

func (DirectoryEntry) DirOffset

func (e DirectoryEntry) DirOffset() uint32

DirOffset returns the offset into the resource directory.

func (DirectoryEntry) ID

func (e DirectoryEntry) ID() ID

ID returns the type of the resource.

func (DirectoryEntry) IsDir

func (e DirectoryEntry) IsDir() bool

IsDir indicates if this resource entry is a directory instead of resource final data.

func (DirectoryEntry) IsString

func (e DirectoryEntry) IsString() bool

IsString determines if this resource contains string data.

func (DirectoryEntry) Size

func (e DirectoryEntry) Size() int

Size returns the size in bytes of the resource entry.

type FixedFileinfo

type FixedFileinfo struct {
	Signature        uint32
	StructVer        uint32
	FileVersionMS    uint32
	FileVersionLS    uint32
	ProductVersionMS uint32
	ProductVersionLS uint32
	FileFlagMask     uint32
	FileFlags        uint32
	FileOS           uint32
	FileType         uint32
	FileSubtype      uint32
	FileDateMS       uint32
	FileDateLS       uint32
}

FixedFileinfo stores attributes that describe the FixedFileInformation entries.

func (FixedFileinfo) Size

func (f FixedFileinfo) Size() int

Size returns the size of this structure in bytes.

type ID

type ID uint32

ID is the type for identifying resource types

const (
	// Version defines version resources
	Version ID = 16
)

func (ID) String

func (id ID) String() string

String yields a human-readable resource type name.

type String

type String struct {
	Length      uint16
	ValueLength uint16
	Type        uint16
}

String contains information about string entries.

func (String) Size

func (s String) Size() int

Size returns the size of this structure.

type StringFileInfo

type StringFileInfo struct {
	Length      uint16
	ValueLength uint16
	Type        uint16
}

StringFileInfo contains information about string file info entries.

func (StringFileInfo) Size

func (s StringFileInfo) Size() int

Size returns the size of this structure in bytes.

func (StringFileInfo) Skip

func (s StringFileInfo) Skip() bool

Skip decides whether to ignore processing the StringFileInfo entries.

type StringTable

type StringTable struct {
	Length      uint16
	ValueLength uint16
	Type        uint16
}

StringTable contains information about string table entries.

func (StringTable) Size

func (s StringTable) Size() int

Size returns the size of this structure in bytes.

type VersionInfo

type VersionInfo struct {
	Length      uint16
	ValueLength uint16
	Type        uint16
}

VersionInfo contains information about version entries.

func (VersionInfo) Size

func (v VersionInfo) Size() int

Size returns the size of this structure.

Jump to

Keyboard shortcuts

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