• 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
How to launch a URL?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to launch a URL?


  • Subject: How to launch a URL?
  • From: Morgan Redman <email@hidden>
  • Date: Tue, 11 Jun 2002 11:09:25 -0700

Hi everyone,

How does one determine the users homepage and launch the url in their default browser? I was able to do this in classic, but now, in X i get bad_access... and im not sure what to do....

the code I am trying to use:


BOOL GetHomePage(Str255 str){
OSStatus err;
ICInstance inst;
ICAttr junk = 0;
err = ICStart(&inst, '????'); // Use your creator code if you have one!
if (err == noErr) {
// err = ICFindConfigFile(inst, 0, nil); this line doesn't work in Carbon
if (err == noErr) {
//Get the Home Page
err = ICGetPref(inst, kICWWWHomePage, (unsigned long*)junk, (void*)str, (long*)sizeof(Str255));
if ( err != noErr){
return false;
}
return true;
}
(void) ICStop(inst);
}
return (err);
}



I get bad_access on ICGetPref. hummmmMMmmm... what to do what to do......

-Morgan
_______________________________________________
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: How to launch a URL?
      • From: Quinn <email@hidden>
  • Prev by Date: Re: screwed by IP filtering?
  • Next by Date: [SOLVED] screwed by IP filtering?
  • Previous by thread: Re: Locations and sets and entities, oh my!
  • Next by thread: Re: How to launch a URL?
  • Index(es):
    • Date
    • Thread