Read-only archive of the All About Symbian forum (2001–2013) · About this archive

Get IP address

2 replies · 1,624 views · Started 27 September 2004

I have a progam using STDLIB for sending and receiving data.
But i don't know a IP address of my emulator for function sendto().
How can i get that IP???
I'm using Series 6.0 v2.0.
Thanks a lot.

If you want to read it from Emulator

HBufC* ip = HBufC::NewLC(KCommsDbSvrMaxFieldLength);

// Open Comms DB
CCommsDatabase* commsDb = CCommsDatabase::NewL();
CleanupStack::PushL( commsDb );

// Get a view to the LANService table
CCommsDbTableView* view = commsDb->OpenTableLC( TPtrC( LAN_SERVICE ) );
User::LeaveIfError( view->GotoFirstRecord() );
TPtr ipPtr(ip->Des());
view->ReadTextL( TPtrC( LAN_IP_ADDR ), ipPtr );

CleanupStack::PopAndDestroy( view );
CleanupStack::PopAndDestroy( commsDb );

return ip;

This does the job . But if you want to read it from Hardware then you have to do it differently .

Hi ,

Can you tell me how to get the access point for Browser Connection Settings?

K.Abi