Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SystemConfiguration framework and Carbon CFM - continued



Hello

thanks everyone for information given and time spent.

I have implemented the technique of loading the SCF at run time and then importing function pointers by means of "SystemConfiguration framework and Carbon CFM" and variables by means of "CFBundleGetDataPointerForName". I also import some functions that work with CFRunLoops from CoreFoundation framework, and a variable 'kCFRunLoopCommonModes'.

I am trying to follow the recommendations given in "Living in Dynamic TCP/IP environment' article. I copied the code snippet and slightly changed it, but left the logic intact.

Now my app crashes in the call to "CFRunLoopAddSource".
The first parameter is the reference to the thread's run loop - I believe it's OK with it since I get it from "CFRunLoopGetCurrent" and it does not return zero.
The second parameter is the 'CFRunLoopSourceRef', which I got from the successful call to "CreateIPAddressListChangeCallbackSCF" - the routine given in the article. My log says that every function called from inside "CreateIPAddressListChangeCallbackSCF" returns successfully, so chances are the returned reference to a newly created run loop source is valid.
The third parameter is kCFRunLoopCommonModes constant (or variable), which I also import from the CoreFoundation framework.


Where did I go wrong?

Meanwhile, when it comes to variables residing in SCF, I do the following - is this right?

if ( bJaguarAndLater )
{
_kSCDynamicStoreDomainState = ( CFStringRef )CFBundleGetDataPointerForName( cfBundle, CFSTR( "kSCDynamicStoreDomainState" ) );
_kSCCompAnyRegex = ( CFStringRef )CFBundleGetDataPointerForName( cfBundle, CFSTR( "kSCCompAnyRegex" ) );
_kSCEntNetIPv4 = ( CFStringRef )CFBundleGetDataPointerForName( cfBundle, CFSTR( "kSCEntNetIPv4" ) );
}
else
{
_kSCDynamicStoreDomainState = CFSTR( "State:" );
_kSCCompAnyRegex = CFSTR( "[^/]+" );
_kSCEntNetIPv4 = CFSTR( "IPv4" );
}


WBR,
Igor

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.