Microsoft KB Archive/315466

= Access Violation in Wininet.dll When a Programs Calls InternetSetOption =

Article ID: 315466

Article Last Modified on 1/31/2007

-

APPLIES TO


 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0

-



This article was previously published under Q315466



SYMPTOMS
When another program calls the Wininet InternetSetOption function with INTERNET_OPTION_PER_CONNECTION_OPTION and a handle that is not null, you may receive an access violation error message in Wininet.dll.



CAUSE
The problem occurs if the InternetSetOption function is called after another function is called.



RESOLUTION
To resolve this problem, obtain the latest service pack for Internet Explorer 6. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

328548 How to Obtain the Latest Internet Explorer 6 Service Pack



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Internet Explorer 6 Service Pack 1.



MORE INFORMATION
The Wininet InternetSetOption function can be used by another program to set an Internet option, such as proxy settings. For additional information about the Wininet InternetSetOption function, see the following Microsoft Web site:

http://msdn.microsoft.com/library/en-us/wininet/wininet/internetsetoption.asp

The following code reproduces the access violation error message: void f1 {  return; }

void main {  HINTERNET hInternetOpen; INTERNET_PER_CONN_OPTION_LIST List; INTERNET_PER_CONN_OPTION Option[OPTIONS]; unsigned long nSize = sizeof(INTERNET_PER_CONN_OPTION_LIST); Option[0].dwOption = INTERNET_PER_CONN_PROXY_SERVER; Option[1].dwOption = INTERNET_PER_CONN_FLAGS;

List.dwSize = sizeof(INTERNET_PER_CONN_OPTION_LIST); List.pszConnection = NULL; List.dwOptionCount = OPTIONS; List.dwOptionError = 0; List.pOptions = Option; hInternetOpen=InternetOpen(&quot;MyRequester&quot;,     INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);

f1; Option[0].Value.pszValue = &quot;http://MyProxy&quot;; Option[1].Value.dwValue = PROXY_TYPE_PROXY;

InternetSetOption(hInternetOpen,      INTERNET_OPTION_PER_CONNECTION_OPTION, &List, nSize); InternetCloseHandle(hInternetOpen); }

Additional query words: av

Keywords: kberrmsg kbbug kbfix kbie600presp1fix kbie600sp1fix KB315466

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.