hook_param
Retrieve the parameter value for a named hook parameter
Behaviour
Look up the value for a named parameter specified in
read_ptr
Write the parameter's value to
write_ptr
Definition
int64_t hook_param (
uint32_t write_ptr,
uint32_t write_len,
uint32_t read_ptr,
uint32_t read_len
);
Example
uint8_t pname[] = {0xCAU, 0xFEU};
uint8_t pvalue[32];
int64_t value_len =
hook_param(pvalue, 32, pname, 2);
Parameters
Name
Type
Description
write_ptr
uint32_t
Pointer to a buffer of a suitable size to store the output. Should be at least 32 bytes.
write_len
uint32_t
Length of the output buffer.
read_ptr
uint32_t
Pointer to a buffer containing the parameter's name
read_len
uint32_t
Length of the parameter's name
Return Code
Type
Description
int64_t
The number of bytes written
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
TOO_SMALL
- The parameter name can't be null
TOO_BIG
- The parameter name is greater than 32 bytes
Last updated
Was this helpful?