ive just written a function to tell the ipv4 of any domain like f.ex "google.com", and for linux, it yust works fine. But now i shwitched to windows and do get an bufferoverflow all the time. It turned out, that i cannot access hostent *raw_list after assignment without an overflow. Any advice?
It also looks like the function is being deprecated, see the Note box near the top of the linked page. (I doubt deprecation is the issue, but it's something to keep in mind for future development).
As this topic is marked with a green tick, it looks like the OP has solved the problem without a comment as to how...
It also looks like the function is being deprecated, see the Note box near the top of the linked page.
It's been superseded by getaddrinfo() which will return both IP4 and IP6 addresses whereas gethostbyname() only works for IP4 addresses. But the OP wanted just IP4 so it's OK.
MS will never remove these 'deprecated' functions as there's far, far too much existing code using them!