![]() |
|
![]() |
![]() |
![]() |
![]() ![]() |
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Am Dienstag den, 22. Oktober 2002, um 10:31, schrieb Quinn:Mit freundlichen Gr|_en
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.
References: | |
>Re: Set default browser and mailapp (From: Christian Weykopf <email@hidden>) |
Home | Search | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 1998 - 2004 Apple Computer, Inc. All rights reserved.