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/

Reply via email to