Quinn's Internet Config bug/issue?
Quinn's Internet Config bug/issue?
- Subject: Quinn's Internet Config bug/issue?
- From: "Paul Popovich" <email@hidden>
- Date: Fri, 22 Nov 2002 10:55:45 -0500
Hello,
I'm using Quinn's Internet Config to configure my Internet and Email
settings. (os X 10.2.2)
Here's the behavior that is being manifested:
On the ROOT account:
It executes without giving me any errors. It fills out all of the
proper fields in the
Internet panel under System Preferences. HOWEVER, when I launch
Internet Explorer or Email, new settings do not
seem to have any effect.
On the USER account (non-root):
I run a user authenticator prior to running this on a non-root account.
It executes without giving me any errors.
HOWEVER, when I check Internet settings under System Preferences, my
values are not there.
Also, on the USER account 'com.apple.internetconfig.plist' gets
corrupted somehow after my operation on it. It won't even open.
I'm not sure what I'm doing wrong, or perhaps the API calls I'm making
are outdated somehow?
I'm including my code for setting a home page key for your inspection:
OSStatus osErr;
ICInstance icInstance;
CFStringRef homepage;
CFDictionaryRef pList;
StringPtr plStringPtr;
jint status = 0;
long int size;
//create connection to IC
osErr = ICStart(&icInstance, kMyCreator);
//get 'homepage' value from my preference list
CFDictionaryGetValueIfPresent(pList, CFSTR("homePage"), (const void
**)&homepage);
//convert it StringPtr type
plStringPtr = (StringPtr)CFStringGetPascalStringPtr(homepage, 0);
//get string size
size = PLstrlen(plStringPtr);
//set homepage key to my value
osErr = ICSetPref(icInstance, kICWWWHomePage, kICAttrNoChange,
plStringPtr, size);
if (osErr == noErr)
{
CFShow(CFSTR("successfully set HomePage") );
}
//when everything is taken care of
ICStop(icInstance);
**Please note, that I have tried settting 'size' to 'size + 1' to
insure it gets the last Pascal byte and I have also verified that
CFStringGetPascalStringPtr() does indeed return the correct value.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.