What is the error? What is the version of SDK installed within your CW 8.0?
As I recall you should upgrade to CW 9.3 to run the Simulator.

vk> Hi all,
vk> In my network application I am trying to get the IP address
vk> of my local host and remote host by function  - NetLibSocketAddr 
vk> . i am using NetMgr.h ,trying my application on Simulato5.0 using
vk> codewarrior8.0 .getting an error..... , but cant figure out my
vk> problem.kindly help!
vk> Thanks
vk> Heres my bit of code : 
vk> *************************************************

vk> Int16 *l1,*l2;
vk> NetSocketAddrINType destAddr, locAddr ; 
vk> NetHostInfoBufPtr hostInfoBufP;
vk> NetIPAddr *IPaddressP;
vk> Int32 AppNetTimeout ;
vk> Err error;

vk> MemSet(&destAddr, sizeof(destAddr), 0); 
vk> destAddr.family = netSocketAddrINET;
vk> destAddr.port = 80;

vk> hostInfoBufP = 
vk>       (NetHostInfoBufPtr) MemPtrNew (sizeof (NetHostInfoBufType));

vk> hostInfoP =
vk> NetLibGetHostByName(AppNetRefnum,"www.xyzl.com",hostInfoBufP,
vk> AppNetTimeout, &error);      //dummy URL

vk> if(hostInfoP !=0)//no error
vk> {
vk>     IPaddressP = (NetIPAddr*)hostInfoBufP->addressList[0];
vk>     destAddr.addr = NetNToHL(*IPaddressP);
vk> //  FldInsert(fldptr1, "gethostbyname successful ", 25);
vk> }

vk> MemSet(&locAddr, sizeof(locAddr), 0); 
vk> /*i ger error here----------have i assigned something wrong here*/
vk> *l1 =sizeof(locAddr);
vk> *l2 =sizeof(destAddr);
vk> result = NetLibSocketAddr(AppNetRefnum,socket ,
vk> (NetSocketAddrType*)&locAddr,l1 ,(NetSocketAddrType *)&destAddr
vk> ,l2, -1, &error);




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

Reply via email to