the detailed parameters of CTServerConnectionRegisterForNotification

Discussion in 'iOS Development' started by lifangjie, Jun 8, 2010.

  1. lifangjie

    lifangjie New Member

    Joined:
    May 20, 2010
    Messages:
    3
    Likes Received:
    0
    I have load coretelephony library successfully with IPHONE 3.1.3
    but the app will break when invoking the function CTServerConnectionRegisterForNotification, I guess the param is not invalid, my code:

    void *handle = dlopen("/System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony", RTLD_LOCAL | RTLD_LAZY);
    void* kCTCellMonitorUpdateNotification = dlsym(handle, "kCTCellMonitorUpdateNotification");
    if( kCTCellMonitorUpdateNotification== NULL)
    {
    write_log_ext("Could not find kCTCellMonitorUpdateNotification\n");
    }
    write_log_ext("find kCTCellMonitorUpdateNotification\n");

    _CTServerConnectionRegisterForNotification(kCTCellMonitorUpdateNotification,connection,&x);

    the connection is returned pointer by _CTServerConnectionCreate

Share This Page