JCL Help:PeRebaseImage

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Rebases an image.


Parameters

Parameters Description
ImageName Filename of the image file to rebase.
NewBase New base address for the executable module. If 0 is specified (the default) the base address is calculated according to the suggestion in the Platform SDK documentation for the RebaseImage API (address is selected based on the first character of the module name). Note that in this case if you rebase multiple images with the same initial character they will all be rebased to the same address.
TimeStamp Specifies the new time stamp for the image. The value must be represented in the number of seconds elapsed since midnight (00:00:00), January 1, 1970, Universal Coordinated Time, according to the system clock.
MaxNewSize Maximum allowed size of the rebased image. If 0 is specified (the default) the maximum size is unlimited.


Return Value

The function returns a TJclRebaseImageInfo record which contains information about the rebase such as the new base address and image size. If the function fails it raises an EWin32Error exception.


Description

PeRebaseImage modifies the load address of the specified image. Rebasing all the images an application uses in such a manner that they can all be loaded at their preferred base address (load address) can dramatically reduce the load time of your application. This function rebases only a single image but it can easily be extended to allow rebasing of an entire application. Note that this function can take a long time to complete. Also, this function is not thread-safe.


See Also

TJclRebaseImageInfo


About

Donator

Petr Vones


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page