how to cast a char *mystring to a structure pointer ??
hey guys, how do you Cast a char *mystring to a structure pointer, namely "hostent" ??
"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 work
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)