PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Ip Address

PIP_INTERFACE_INFO if_info;
ulong size=0;
DWORD result;
result=GetInterfaceInfo(NULL,&size;);
// check result here


if_info=(PIP_INTERFACE_INFO)malloc(size);
if(if_info != NULL)
{
result=GetInterfaceInfo(if_info,&size;);

if(IpRenewAddress(&if;_info->Adapter[0]) == NO_ERROR)

sockClient.Connect(destination, PORT)

i think that after renew, it have not get a ip and its start connect ..

can someone help ..
I've done a whole lot of socket programming, and I've never needed to use GetInterfaceInfo or IpRenewAddress. What are you trying to do?

Dan East
Current i'm working on a school project. It require location based services and thats why i need to release my ip and get a new one.

The problem is solved but i got another one.

When my PDA change to another network, the DHCP server address stays so i'm getting the ip address from the wrong DHCP server, how do i change it.