hook_skip
Behaviour
Section titled “Behaviour”- Search the hook chain for a hook identified by the hook hash at
read_ptr
- Mark it as disabled for this chain execution
- Skip the execution of a hook based on the provided hash and flag.
- Returns a status code indicating the result of the operation.
Definition
Section titled “Definition”int64_t hook_skip ( uint32_t read_ptr, uint32_t read_len, uint32_t flags);
function hook_skip( hash: ByteArray | HexString, flag: number ): ErrorCode | number
Example
Section titled “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);
const phash = [ 0x19, 0xFE, 0x69, 0xF1, 0x53, 0x66, 0x4E, 0x8C, 0x97, 0xF4, 0x4C, 0x5C, 0x3C, 0x65, 0x63, 0x79, 0xC2, 0xD0, 0x26, 0xE7, 0x90, 0xEF, 0x38, 0xF7, 0xED, 0x73, 0xE9, 0xCE, 0x9C, 0x9D, 0xBF, 0x03 ]const result = hook_skip(phash, 0);
Parameters
Section titled “Parameters”Name | Type | Description |
---|---|---|
read_ptr | uint32_t | Pointer to a buffer containing the hook hash |
read_len | uint32_t | Length of the hook hash (always 32) |
flags | uint32_t | If 0: |
Name | Type | Description |
---|---|---|
hash | ByteArray or HexString | The hash of the hook to skip. |
flag | number | A flag indicating the reason for skipping the hook. |
Return Code
Section titled “Return Code”Type | Description |
---|---|
int64_t | If 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 |
Type | Description |
---|---|
number or ErrorCode | Returns a status code indicating the result of the operation. |