When calling the wait() method Visual Studio (Windows XP) gives the following debug message:
First-chance exception at 0x7c812a5b in app.exe: 0x000006BA: The RPC-server is unavailable.

And the program never gets past the wait method, it hangs there forever. When interrupting using the debugger Visual Studio says: "The process appears to be deadlocked (or is not running any user-mode code)."

When debugging I found that the exception is thrown in the call gethostbyname() in the method DNS::hostByName in file DNS.cpp.

Funny is that this code used to work. I think it stopped working after unplugging one of the network cables that enable an ad-hoc network for my laptop. However, my pc still has internet access (all internet apps still work).