Set or delete a parameter on a hook on the same account further down the execution chain


  • Search the hook chain on the hook account for a 32 byte hash indicated by hread_ptr
  • If found: set a parameter:
  • With the parameter name indicated by kread_ptr and
  • The parameter value indicated by read_ptr


int64_t hook_param_set (
    uint32_t read_ptr,
    uint32_t read_len,
    uint32_t kread_ptr,
    uint32_t kread_len,
    uint32_t hread_ptr,
    uint32_t hread_len  


uint8_t pvalue[] = "some parameter value";
uint8_t pname[] = "paramname";
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_param_set(pvalue, sizeof(pvalue),
                   pname, sizeof(pname),
                   phash, sizeof(phash));


read_ptruint32_tPointer to parameter value
read_lenuint32_tLength of the parameter value
kread_ptruint32_tPointer to the parameter name
kread_lenuint32_tLength of the parameter name
hread_ptruint32_tPointer to hook hash
hread_lenuint32_tLength of hook hash (always 32)

Return Code

int64_tThe length of the parameter value successfully set

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

- The parameter name can't be null

- The parameter name is greater than 32 bytes