How to launch a URL?
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.