Quick Info

Windows NT
Yes
Win95
Yes
Win32s
No
Import Library
imagehlp.lib
Header File
imagehlp.h
Unicode
No
Platform Notes
Windows 95: IMAGEHLP is available as a redistributable.

ReBaseImage

The ReBaseImage function is used to change the load address for a Win32 image, which reduces the required load time for a DLL.

BOOL ReBaseImage(

IN LPSTR CurrentImageName,

IN LPSTR SymbolPath,

IN BOOL fReBase,

IN BOOL fRebaseSysfileOk,

IN BOOL fGoingDown,

IN DWORD CheckImageSize,

OUT LPDWORD OldImageSize,

OUT LPDWORD OldImageBase,

OUT LPDWORD NewImageSize,

IN OUT LPDWORD NewImageBase,

IN DWORD TimeStamp

);

Parameters

CurrentImageName

The filename that is rebased.

SymbolPath

The path to find the corresponding symbol file.

fReBase

The image is rebased if this value is TRUE.

fRebaseSysfileOk

System images can be rebased only if this value is TRUE. A system image is one that has a preferred load address of 0x80000000 or greater.

fGoingDown

If the image should be rebased below the given base, this value is TRUE.

CheckImageSize

The maximum size that the image can grow to, or zero if there is no limit.

OldImageSize

The original image size before the rebase operation.

OldImageBase

The original image base before the rebase operation.

NewImageSize

The new image size after the rebase operation.

NewImageBase

The new image base after the rebase operation.

TimeStamp

The new time stamp for the image. Use the C run-time (CRT) function time to retrieve a compatible time stamp value. 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.

Return Values

If the function succeeds, the return value is TRUE.

If the function fails, then the return value is FALSE. To retrieve extended error information, call GetLastError.

Remarks

The ReBaseImage function changes the desired load address for a Win32 image. This operation involves reading the entire image and updating all fixups, debug information, checksum, and time stamp values. The purpose of this function is to reduce the required load time for DLLs. If an application can rely on a DLL being loaded at the desired load address, then the system loader does not have to relocate the image. The image is simply loaded into the application's virtual address space and the DLL's initialization routine is called, if one is present.

A well-behaved application has all its DLLs rebased so they each fall within a unique range of the virtual address space. Microsoft publishes an address range that applications should use for their DLLs. By using this address range, the ReBaseImage function, and the list of application DLLs, each one of the DLLs can be assigned a unique base address. This process can be part of the build process or part of the final release procedure for the application.

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database