Skip to main content

skip_call

Function skip_call 

Source
pub unsafe fn skip_call(
    wrapctx: *mut c_void,
    retval: Retval,
    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 “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.

Returns whether successful.