• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Set default browser and mailapp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set default browser and mailapp


  • Subject: Re: Set default browser and mailapp
  • From: Christian Weykopf <email@hidden>
  • Date: Tue, 22 Oct 2002 16:47:29 +0200

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.

  • Follow-Ups:
    • Re: Set default browser and mailapp
      • From: Christian Weykopf <email@hidden>
References: 
 >Re: Set default browser and mailapp (From: Quinn <email@hidden>)

  • Prev by Date: Re(2): Set default browser and mailapp
  • Next by Date: Re: Re(2): Set default browser and mailapp
  • Previous by thread: Re: Re(2): Set default browser and mailapp
  • Next by thread: Re: Set default browser and mailapp
  • Index(es):
    • Date
    • Thread