Check TCP/IP Properties (the process may be slightly different in Win7 but this is how you do it in XP)
Start, Connect To, Connection, Properties, Scroll Down TCP/IP and highlight, click Properties and check that Obtain DNS and IP address automatically are enabled.
But check Device Manager (Windows Control Panel, System, Hardware) to see if it's showing up or is yellow flagged as faulty. Could be just a driver re-install is needed.
Also check things like wireless security password (you might try turning off wireless security in the router temporarily as a test).
Possibly the USB wireless adapter has failed -- they tend to overheat. If necessary, you should be able to replace with a USB wireless adapter of any brand -- though if 802.11n I would go for another D-Link for compatibility.