Unit 'EXEC' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

SetFunction

Change a function vector in a library

Declaration

Source position: exec.pas line 1280

function SetFunction(

  lib: pLibrary;

  funcOffset: LongInt;

  newFunction: tPROCEDURE

):POINTER;

Arguments

lib

  

A pointer to the library to be changed

funcOffset

  

The offset of the function to be replaced

newFunction

  

A Pointer to new function

Function result

Pointer to the old function that was just replaced

Description

SetFunction is a functional way of changing where vectors in a library point. They are changed in such a way that the checksumming process will never falsely declare a library to be invalid.

Warning

While it's more or less safe to patch a library vector with SetFunction() it's not possible to safely remove the patch later. So don't use this function if it can be avoided.


Documentation generated on: 2021-07-30