RemoveRelocations

The RemoveRelocations function strips relocation information from an executable image.

VOID RemoveRelocations(
  IN LPSTR ImageName  
);
 

Parameters

ImageName
Pointer to a null-terminated string that specifies the name of the image from which to strip relocations. You must use a fully qualified path.

Return Values

None.

Remarks

The RemoveRelocations function strips relocation information from an executable image. This function exists so an image can be rebased (using the ReBaseImage function) after building and then have the relocations stripped so it will always load at that preferred load address. However, it is not recommended that you do this, because the image will not load if its preferred load address is occupied.

QuickInfo

  Windows NT: Requires version 4.0 or later.
  Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in imagehlp.h.
  Import Library: Use imagehlp.lib.

See Also

PE Image Helper (ImageHlp) Overview, ImageHlp Image Modification Functions, ReBaseImage