Re: Set default browser and mailapp
Re: Set default browser and mailapp
- Subject: Re: Set default browser and mailapp
- From: Christian Weykopf <email@hidden>
- Date: Wed, 23 Oct 2002 18:04:20 +0200
Am Dienstag den, 22. Oktober 2002, um 16:47, schrieb Christian Weykopf:
Hi,
are there any errors in my code? I've tried it on severel machines.
In my app I write a lot more keys. All are stored except the mailapp and
browser. This happens with Jaguar and 10.1.5.
Am Dienstag den, 22. Oktober 2002, um 10:31, schrieb Quinn:
At 2:48 +0200 22/10/02, Christian Weykopf wrote:
how do I set the default browser and the default mailapp?
ICSetPref () doesnt't work.
ICSetPref is currently the only API to do this. It should work; I've
definitely written code that works this way. Perhaps you could post your
setting code and we can look for any problems.
This code runs fine with 10.1.5 but fails with 10.2.1
In my app I set email, search page and startpage also. This works with 10.
1.5 and 10.2.1. Only setting default browser and mailapp fails. On both
versions.
#import <Foundation/Foundation.h>
#import <Carbon/Carbon.h>
int main (int argc, const char * argv[])
{
ICAppSpec icAppSpec;
BOOL result;
long seed;
ICInstance mICInstance;
OSStatus err;
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
err = ICStart(&mICInstance, 'TONL');
if(noErr != err)
{
NSLog (@"Error ICStart () %d", err);
return 1;
}
err = ICBegin(mICInstance, icReadWritePerm);
if(noErr != err)
{
NSLog (@"Error ICBegin () %d", err);
return 1;
}
ICGetSeed (mICInstance, &seed);
NSLog (@"Seed %d", seed);
icAppSpec.fCreator = 'MSIE';
/* strcpy (&icAppSpec.name[1], "Internet Explorer");
icAppSpec.name[0] = strlen ("Internet Explorer");*/
err = ICSetPref(mICInstance, "\pHelperhttp", kICAttrNoChange,
&icAppSpec, sizeof(ICAppSpec));
if(noErr != err)
{
NSLog (@"Error ICSetPref () %d", err);
}
ICGetSeed (mICInstance, &seed);
NSLog (@"Seed %d", seed);
ICEnd(mICInstance);
ICStop(mICInstance);
return 0;
}
Mit freundlichen Gr|_en
Christian Weykopf
--
Meilenstein Software GmbH
Neue Strasse 5
D-31582 Nienburg
Tel: +49 (0) 5021 91 24 44
Fax: +49 (0) 5021 91 24 45
http://www.meilenstein.de/
mailto:email@hidden
_______________________________________________
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.
Mit freundlichen Gr|_en
Christian Weykopf
--
Meilenstein Software GmbH
Neue Strasse 5
D-31582 Nienburg
Tel: +49 (0) 5021 91 24 44
Fax: +49 (0) 5021 91 24 45
http://www.meilenstein.de/
mailto:email@hidden
_______________________________________________
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.