cast function pointer first arguments to invoke