Skip to main content

dr_get_app_args

Function dr_get_app_args 

Source
pub unsafe extern "C" fn dr_get_app_args(
    args_array: *mut dr_app_arg_t,
    args_count: c_int,
) -> c_int
Expand description

Provides information about the app’s arguments by setting \p args_array up to the count denoted by \p args_count. Therefore, \p args_count is not the size of the buffer in bytes but the number of #dr_app_arg_t values that \p args_array can store. Returns the number of args set or -1 on error.

Use dr_app_arg_as_cstring() to get the argument as a string.

Use dr_num_app_args() to query the total number of command-line arguments passed to the application.

\note Currently, this function is only available on Unix with early injection.

\note An error code may be obtained via dr_get_error_code() when this routine fails.