/* External */ #include #include #include #include #include #include #include #include static void * (*CTCallDialWithIDOrig)(void *p, int contact_id, unsigned char contact_type, void * x1, void * x2) = NULL; void * CTCallDialWithID(void *p, int contact_id, unsigned char contact_type, void * x1, void * x2) { void * status = 0; /* Get the original symbol, you need to link this against CoreTelephony for it to work */ if (CTCallDialWithIDOrig == NULL) CTCallDialWithIDOrig = dlsym(RTLD_NEXT, "CTCallDialWithID"); /* Go FUNKY here ! */ /* Call original symbol*/ status = CTCallDialWithIDOrig(p, contact_id, contact_type, x1, x2); return status; }