Below, you can find a link to the source code with the function(s) to add and remove entries in the Windows hosts file.
Source : Modifying the hosts entry on Windows
Mar 6th, 2009 by carrumba
Leave a comment
But please respect the commenting rules. Critizism is appreciated and also general comments of course. If you're rude, I have to delete your comment. Also use your personal/nick name but avoid using business names. Have fun and thanks for participating the discussion.