ok, having (more and more and more) pointer troublerthis time its trying to get my IP but i can't seem to get even 1 out of the hostent.
i know that this returns one of multiple network adresses, but looping throught htem wron't be to hard once i manage to get 1 I suppose)
i get a message box with garbage in itCode:char localName[256]; LPHOSTENT localMachine; //geting host name for local 'puter gethostname(localName, sizeof(localName)); //making a hostent with above name localMachine = gethostbyname(localName); //getting first adress //HELP NEEDED HERE PLEASE =) char * addrList = *(localMachine->h_addr_list[0]); //print IP (hopefuly) MessageBox(NULL,addrList,"your adress is...",MB_OK);
TIA peeps



LinkBack URL
About LinkBacks
this time its trying to get my IP but i can't seem to get even 1 out of the hostent.



