Hi, I wanted to use the the iphlpapi library to obtain the computer's MAC address (as it's shown here), however I ran into a bit of trouble with using the library.

The code works perfectly and in fact I can comment the code out and still have the same problem. The problem comes with linking to iphlpapi.lib. There is no problem linking to the library and starting the program, however once the program is running, it manages to stall itself, the IDE, and pretty much the rest of the computer.

This behavior is not consistant though. If I do a clean rebuild of my project, the program will run fine. However if I make a non-trivial change to the code, this problem returns. The program does not freeze completely, but processes very slowly. I can step through the code in the debugger, and each line can take about 10 seconds to process.

Has anyone experienced this before? What could I do to fix it? What might be the cause of this problem? Any thoughts are appreciated.