Skip to main content

drwrap_skip_call

Function drwrap_skip_call 

Source
pub unsafe extern "C" fn drwrap_skip_call(
    wrapcxt: *mut c_void,
    retval: *mut c_void,
    stdcall_args_size: usize,
) -> bool_
Expand description

May only be called from a \p drwrap_wrap pre-function callback. Skips execution of the original function and returns to the function’s caller with a return value of \p retval. The post-function callback will not be invoked; nor will any pre-function callbacks (if multiple were registered) that have not yet been called. If the original function uses the \p stdcall calling convention, the total size of its arguments must be supplied. The return value is set regardless of whether the original function officially returns a value or not. Further state changes may be made with drwrap_get_mcontext() and drwrap_set_mcontext() prior to calling this function.

\note It is up to the client to ensure that the application behaves as desired when the original function is skipped.

\return whether successful.