Hays, Jonathan (GE Infrastructure) wrote:

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

Have you ever tested this code? does it work? because I did something quite like it and after did a NetLibIFSettingGet and it didn't return the settings I had set. Instead it didn't return anything at all, not even changed the size of the return value like it is documented.




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

Reply via email to