I am sending the code for the problem. Hope someone will look at it

        <snip>

        err = NetLibSettingGet(AppNetRefnum, netSettingHostName, strHostName,
&nLenHostName);
        if (err!=0)
                ErrAlert(err); //THIS IS WHERE I GET CHECK UR NETWORK SETTINGS
        ptrBuf =
NetLibGetHostByName(AppNetRefnum,strHostName,&bufHost,-1,&errno);
        if (ptrBuf == 0)
        {
                ErrAlert(errno);
                return false;
        }
        MemMove(&Addr.addr,&ptrBuf->addrListP[0][0],ptrBuf->addrLen);

        <snip>

I would like to add that to overcome the linger problem, I have added a
registry entry in win2k
to make linger 30 seconds....just in case that matters!

thanks in advance
nihar

> Greetings!
>
> I am sending this query for the third time. Hopefully someone will answer
me!
>
> I have to get the IP address of the host so i use NetLibSettingGet() to
get
> the host name and then NetLibGetHostByName() to get the host IP address.
> But NetLibSettingGet() gives an error which when i display with ErrAlert
> says
>  "Incomplete setup: Please check your network settings (Net121A)"
>
> I have checked "Redirect tcp/ip calls....." in poser.
> All my other NetLib function are working well.
>
> The intriguing thing is that despite of this error, many a times I do get
the
> correct host IP!!! other times it gives me memory error!!
> Specifically although I get the "Incomplete setup.." error, I always get
the host IP correct the first time after reset.
>
> Have I missed anything? or is there any other method to get host IP
address.
> Please enlighten me!!
>
> Thanks in advance
>
> Nihar Desai
>
>
>
>
>


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

Reply via email to