hey guys, how do you Cast a char *mystring to a structure pointer, namely "hostent" ??
looking at
http://msdn.microsoft.com/library/de.../hostent_2.asp ,
it says
like this??"On successful completion, the buffer specified to the original function call contains a hostent structure. To access the elements of this structure, the original buffer address should be cast to a hostent structure pointer and accessed as appropriate."
nope it doesnt workCode:char *hostEntry2 ; hostent *abc= (HOSTENT)*hostEntry2;
i ultimately want to use WSAAsyncGetHostByName to get the IP address of a computer. ( i use WSA version because the GetHostByName version blocks)
any help?



LinkBack URL
About LinkBacks


