Compaq AA-RH99A-TE Remote Starter User Manual


 
3.2.17 Passing an Extension to kdbx
The new_proc function directs kdbx to execute a proc command with
arguments specified in args. The args arguments can name an extension
that is included with the operating system or an extension that you create.
This function has the following syntax:
void new_proc(
char* args,
char** output_ret);
Argument
Input/Output
Description
args
Input Names the extensions to be passed to kdbx
output_ret
Output Returns the output from the extension,
if it is non-NULL
For example:
static void prmap(long addr)
{
char cast_addr[36], buf[256], *resp;
sprintf(cast_addr, "((struct\ vm_map_t\ *)\ 0x%p)", addr);
sprintf(buf, "printf
cast_addr);
new_proc(buf, &resp);
print(resp);
free(resp);
}
3.2.18 Getting the Next Token as an Integer
The next_number function converts the next token in a buffer to an integer.
The function returns TRUE if successful, or FALSE if there was an error.
This function has the following syntax:
Boolean next_number(
char* buf,
char** next,
long* ret);
Argument
Input/Output
Description
buf
Input Names the buffer containing the value
to be converted
next
Output Returns a pointer to the next value in the
buffer, if that value is non-NULL
ret
Output Returns the integer value
3–14 Writing Extensions to the kdbx Debugger