Please let us know how things turn out. I don't like that dnsapi.dll business at all. I still think you may have a serious trojan. In which case a clean install is probably the best thing to do.
If it was hardware, then you would be getting other indications and the system would not be calling for a file.
I don't know how much use it will be to you, but these are the instances of dnsapi in my system on this machine running x64 Ultimate, with locations, sizes, and dates;
If you have anything else, or obvious size or date discrepancies then I would be very suspicious indeed. Also, Windows can not simply "lose" dll's for no reason.
Further, I would remove Avast and use MSE ( Microsoft Security Essentials); http://www.microsoft.com/en-us/secur...s/default.aspx
Also, if you are behind a router then you don't need a firewall. ( Just in case you are using one).