Re: Internet Config Example under Cocoa
Re: Internet Config Example under Cocoa
- Subject: Re: Internet Config Example under Cocoa
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 6 Feb 2003 14:58:11 +0100
On Thursday, February 6, 2003, at 02:08 PM, daniele m. wrote:
Hello,
I would to read the internet configuration settings (like smtp server,
pop server, mail etc) for my own cocoa application. I think that i need
of some carbon APIs but i don't know how to use these callbacks.
Anyone have a good example to implement in my app?
ICInstance tInstance;
Handle tHandle=NewHandle(10);
ICAttr tAttributes;
CFIndex count;
status=ICStart(&tInstance,'MYAP');
if (status==noErr)
{
status=ICBegin(tInstance,icReadOnlyPerm);
if (status==noErr)
{
status=ICCountPref(tInstance,&count);
if (status==noErr)
{
status=ICFindPrefHandle(tInstance,TheKeyImLookingfor,&tAttributes,tHandl
e);
if (status==noErr && GetHandleSize(tHandle)>0)
{
// To be continued...
}
}
}
status=ICEnd(tInstance);
if (status==noErr)
{
status=ICStop(tInstance);
}
}
DisposeHandle(tHandle);
Hope it works and helps.
_______________________________________________
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.