HOTFIX: The buffer size of the InternetQueryOptionW function is half of its actual size if you use INTERNET_OPTION_URL as the second parameter in IE7
This problem occurs because of an error in the Wininet.dll file and does not occur in earlier versions of Internet Explorer
http://support.microsoft.com/default.aspx/kb/935777
A comprehensive list of IE7 related Knowledge Base articles can be found here:
http://www.ie-vista.com/kbase3.html