SCNetworkConnectionCreateWithServiceID crashing
SCNetworkConnectionCreateWithServiceID crashing
- Subject: SCNetworkConnectionCreateWithServiceID crashing
- From: Tackel <email@hidden>
- Date: Tue, 13 Jul 2004 12:03:59 +0200
Hi Guys,
I'm trying to establish a PPP connection a getting its status changes
using SCNetworkConnectionCallBack (I used before PPP lib but found some
issued). I can create the SCNetworkConnectionRef and even start and
stop it. But cannot not get the status changes using the callbacks. I'm
sure I'm doing something wrong.
Using the code below the app always crashes when creating the
SCNetworkConnection. Do you know what I'm doing wrong
/**********
My Code
**********/
void myCallBack (SCNetworkConnectionRef connection,
SCNetworkConnectionStatus status,
void *info)
{
CFShow (CFSTR ("myCallBack called"));
}
//Main function
SCNetworkConnectionRef myConnection;
SCNetworkConnectionContext context ;
myConnection = SCNetworkConnectionCreateWithServiceID ( NULL,
CFSTR("1"),
myCallBack,
&context) ;
if (myConnection != NULL)
CFShow (CFSTR ("SCNetworkConnectionRef created"));
/********************* Reference
SCNetworkConnectionRef SCNetworkConnectionCreateWithServiceID (
CFAllocatorRef allocator,
CFStringRef serviceID,
SCNetworkConnectionCallBack callout,
SCNetworkConnectionContext *context )
AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
typedef void (*SCNetworkConnectionCallBack) (
SCNetworkConnectionRef connection,
SCNetworkConnectionStatus status,
void *info ) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
********************************************/
Txs,
Tackel
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.