Thanks, that was exactly what i needed. (Strange that I couldn't find it myself) Just a small correction, if you please: call gethostname ;- API Function - cmp eax,0h ;error ? <<---- You don't need to check if eax=0, because gethostname returns 0 in case of no error. Also, push OFFSET Buffer ;name, pointer to name of the host call gethostbyname ;- API Function - cmp eax,0h ;error ^ (no eax check) |==== gethostbyname returns NULL pointer if error. If OK, returns pointer to the HOSTENT structure (MSDN) Cya!
OOps - sorry, this should go to reply in my previous topic! ;-)