Panda3D
|
Public Member Functions | |
def | add_icon (self, icon, ordinal=2) |
def | add_resource_section (self) |
def | add_section (self, name, flags, data) |
def | add_version_info (self, file_ver, product_ver, data, lang=1033, codepage=1200) |
def | close (self) |
def | get_address_offset (self, addr) |
def | get_address_section (self, addr) |
def | get_export_address (self, symbol_name) |
def | open (self, fn, mode='r') |
def | read (self, fp) |
def | write_changes (self) |
Public Attributes | |
exp_rva | |
file_alignment | |
fp | |
header_size | |
imp_rva | |
imports | |
res_rva | |
resources | |
rva_offset | |
sections | |
uninitialized_size | |
vmem | |
Static Public Attributes | |
tuple | imports = () |
def add_icon | ( | self, | |
icon, | |||
ordinal = 2 |
|||
) |
Adds an icon resource from the given Icon object. Requires calling add_resource_section() afterwards.
def add_resource_section | ( | self | ) |
Adds a resource section to the file containing the resources that were previously added via add_icon et al. Assumes the file does not contain a resource section yet.
def add_section | ( | self, | |
name, | |||
flags, | |||
data | |||
) |
Adds a new section with the given name, flags and data. The virtual address space is automatically resized to fit the new data. Returns the newly created Section object.
def add_version_info | ( | self, | |
file_ver, | |||
product_ver, | |||
data, | |||
lang = 1033 , |
|||
codepage = 1200 |
|||
) |
Adds a version info resource to the file.
def close | ( | self | ) |
def get_address_offset | ( | self, | |
addr | |||
) |
Turns an address into a offset relative to the file beginning.
def get_address_section | ( | self, | |
addr | |||
) |
Returns the section that this virtual address belongs to.
def get_export_address | ( | self, | |
symbol_name | |||
) |
Finds the virtual address for a named export symbol.
def open | ( | self, | |
fn, | |||
mode = 'r' |
|||
) |
def read | ( | self, | |
fp | |||
) |
Reads a PE file from the given file object, which must be opened in binary mode.
def write_changes | ( | self | ) |
Assuming the file was opened in read-write mode, writes back the changes made via this class to the .exe file.
exp_rva |
file_alignment |
fp |
header_size |
imp_rva |
|
static |
imports |
res_rva |
resources |
rva_offset |
sections |
uninitialized_size |
vmem |