Hi,
        First get the NetPrefs App Type(rsrc) and creatorID(netl) and use
DmGetNextDatabaseByTypeCreator for getting cardno and dbID of netPrefs app.

        Use SysUIAppSwitch or SysAppLaunch for launching net prefs app.


Regards
Nag
----- Original Message -----
From: Srinivas Mogalapalli <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Friday, July 14, 2000 4:32 PM
Subject: Question on Launching Network prefrences from my application


> I want to to launch 'Network Preferences' panel from my application when
the
> user hits a button.  How do I do this?
>
> I tried the code below but something is definitely wrong with this.  What
is
> wrong with this code?
>
> (i) I am also not sure how to specify to go to the right prefrences panel
as
> there are multiple-preferences panels)
> (ii) I am also not sure whether I should use SysAppLaunch or
SysUIAppSwitch
> in this case.
>
> Thanks - Srinivas
>
> Launch(sysFileTApplication, 'pref',  sysAppLaunchCmdPanelCalledFromApp,
> NULL, false);
>
> where the function Launch is defined as:
>
> Err Launch(UInt32 type, UInt32 creator, UInt16 launchCode,
>    void *param, Boolean sub)
> {
> DmSearchStateType searchState;
> UInt16 cardNo;
> LocalID dbID;
> Err err;
> UInt32 result;
>
> // look for the app
> err = DmGetNextDatabaseByTypeCreator(true, &searchState, type,
>
> creator, true, &cardNo, &dbID);
>
> if (err == 0) {
> if (dbID) {
> // launch the app
> if (sub)
> err = SysAppLaunch(cardNo, dbID, 0,
> launchCode, (char *)param, &result);
> else
> err = SysUIAppSwitch(cardNo, dbID,
> launchCode, (char *)param);
> } else {
> err = -1;
> }
> }
> return err;
> }
>
>
> - Srinivas
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/tech/support/forums/
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to