These docs are for v2.0. Click to read the latest docs for v3.0.

Skip a hook that appears later in the hook chain on the hook account

Behaviour

  • Search the hook chain for a hook identified by the hook hash at read_ptr
  • Mark it as disabled for this chain execution

Definition

int64_t hook_skip (
    uint32_t read_ptr,
    uint32_t read_len,
    uint32_t flags
);

Example

uint8_t phash[] = { 0x19U, 0xFEU, 0x69U, 0xF1U, 0x53U, 0x66U, 0x4EU, 0x8CU, 
                    0x97U, 0xF4U, 0x4CU, 0x5CU, 0x3CU, 0x65U, 0x63U, 0x79U, 
                    0xC2U, 0xD0U, 0x26U, 0xE7U, 0x90U, 0xEFU, 0x38U, 0xF7U, 
                    0xEDU, 0x73U, 0xE9U, 0xCEU, 0x9CU, 0x9DU, 0xBFU, 0x03U };
int64_t result = 
  	hook_skip(phash, 32, 0);

Parameters

NameTypeDescription
read_ptruint32_tPointer to a buffer containing the hook hash
read_lenuint32_tLength of the hook hash (always 32)
flagsuint32_tIf 0:
- add the hash to the hook skip list

If 1
- remove the hash from the hook skip list

Return Code

TypeDescription
int64_tIf successful 1

If negative, an error:
OUT_OF_BOUNDS
- pointers/lengths specified outside of hook memory.

DOESNT_EXIST
- The specified paramater doesn't exist or is null

INVALID_ARGUMENT
- Hash is not 32 bytes