It doesn't show up because you need to tell the NetLib to save it.  Check out 
NetLibConfigSaveAs to do that.

-Jon

-------------------------------------------
Jonathan Hays
Palm OS Certified Developer
http://hazelware.luggle.com 
-------------------------------------------


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Vladimir
Lozhnikov
Sent: Monday, February 28, 2005 5:14 AM
To: Palm Developer Forum
Subject: to create new service for Communication->Network preference


hi.
i need code for setting "preferences->communication->network". i know
how to create new connection

CncAddProfile
CncProfileSettingSet

but i can't create the new network service.

below my code

err = SysLibFind( "Net.lib", &refno );
UInt32 ifCreator = 0;
UInt16 ifInstance = 0;
while( true )
{
 err = NetLibIFGet( refno, wIndex++, &ifCreator, &ifInstance );
 if( err != errNone ) break;
 if( ifCreator == netIFCreatorPPP )
 {
  ...
  err = NetLibIFSettingSet( refno, ifCreator, ifInstance,
                            netIFSettingServiceName,
                            ( const char* )strService, strService.GetLength() + 
1 );

  ...
  err = NetLibIFSettingSet( refno, ifCreator, ifInstance,
                            netIFSettingConnectionName,
                            ( const char* )strConnection, 
strConnection.GetLength() + 1 );

  ...
  err = NetLibIFSettingSet( refno, ifCreator, ifInstance,
                            netIFSettingDNSQuery,
                            &btTrue, sizeof( UInt8 ) );

  ...
  err = NetLibSettingSet( refno, netSettingPrimaryDNS,
                          &Addr, sizeof( UInt32 ) );

  ...
  err = NetLibSettingSet( refno, netSettingSecondaryDNS,
                          &Addr, sizeof( UInt32 ) );

  ...
  err = NetLibIFSettingSet( refno, ifCreator, ifInstance,
                            netIFSettingReqIPAddr, &Addr, sizeof( UInt32 ) );

  ...
  err = NetLibIFSettingSet( refno, ifCreator, ifInstance,
                            netIFSettingLoginScript, pstrScript, wPosition );
 }
};


this code return err == errNone always. but when i go to
Communication->Network i don't see my service name.
why?

thanx


-- 
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/

Reply via email to