Skip to main content

drwrap_get_arg

Function drwrap_get_arg 

Source
pub unsafe extern "C" fn drwrap_get_arg(
    wrapcxt: *mut c_void,
    arg: c_int,
) -> *mut c_void
Expand description

Returns the value of the \p arg-th argument (0-based) to the wrapped function represented by \p wrapcxt. Uses the calling convention set by drwrap_wrap_ex(), or for drwrap_wrap() assumes the regular C calling convention. May only be called from a \p drwrap_wrap pre-function callback. To access argument values in a post-function callback, store them in the \p user_data parameter passed between the pre and post functions.

This routine may de-reference application memory directly, so the caller should wrap in DR_TRY_EXCEPT if crashes must be avoided.