Chameleon 2.1 Released
0 Members and 1 Guest are viewing this topic.
void print_nb_value_hook(void* arg1, void* arg2, void* arg3, void* arg4){ int *value_ptr = (int*)arg1; int value = *value_ptr; printf("the value is %i\n", value); }void print_Hello_hook(void* arg1, void* arg2, void* arg3, void* arg4){ printf("Hello, World!\n"); }int entry_point (){ register_hook_callback("print_nb_value", &print_nb_value_hook); register_hook_callback("print_Hello", &print_Hello_hook); execute_hook("print_Hello", NULL, NULL, NULL, NULL); int i_want_2_print_this_value_through_my_callback = 2; execute_hook("print_nb_value", &i_want_2_print_this_value_through_my_callback, NULL, NULL, NULL); return 0;}
Hello, World!the value is 2