Short answer:
Use NetLibIFSettingSet() with netIFSettingUsername to set the user name and
netIFSettingPassword to set the password.
Long answer (with error checking code removed):
UInt16 ifInstance = 0;
UInt32 ifCreator;
UInt16 currnetIFInstance;
UInt16 i = 0;
err = NetLibIFGet(netLibRef,i,&ifCreator,&currnetIFInstance);
while (err == errNone && ifInstance == 0)
{
if (ifCreator == netIFCreatorPPP)
ifInstance= currnetIFInstance;
i++;
err = NetLibIFGet(netLibRef,i,&ifCreator,&currnetIFInstance);
}
err = NetLibIFSettingSet(netLibRef,netIFCreatorPPP,ifInstance,netIFSettingUsername,
(void*)pszUserName, StrLen(pszUserName)+1);
err = NetLibIFSettingSet(netLibRef,netIFCreatorPPP,ifInstance,netIFSettingPassword,
(void*)pszPassword, StrLen(pszPassword)+1);
-Jon
--------------------------------------------
Jonathan Hays
Palm OS Certified Developer
http://hazelware.luggle.com
--------------------------------------------
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Leonardo
Santagada
Sent: Monday, April 26, 2004 8:00 PM
To: Palm Developer Forum
Subject: Changing Network Settings
I want to change basically the username/password and phone number of a
ppp conection. Does someone have done this successfully, either using
NetLibIFSettingSet or any other mean?
thanks in advance,
Leonardo Santagada
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/