DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 838098 - Last Review: January 5, 2007 - Revision: 4.0

On This Page

SYMPTOMS

The SetProxy method sets the proxy server for an HTTP request. When you create an application that uses the WinHttpRequest object, if you call the Open method before you call the SetProxy method, your application may leak two event handles for every HTTP request.

RESOLUTION

Service pack information

To resolve this problem, obtain the latest service pack for Microsoft Windows XP or for Microsoft Windows 2000. For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:
322389  (http://support.microsoft.com/kb/322389/ ) How to obtain the latest Windows XP service pack
260910  (http://support.microsoft.com/kb/260910/ ) How to obtain the latest Windows 2000 service pack
The WinHTTP5.dll hotfix has been replaced by the WinHTTP.dll file in Windows 2000 Service Pack 3 (SP3) and in Windows XP Service Pack 2 (SP2). Support for the WinHTTP5.dll file expired October 1, 2004. Therefore, you should use the WinHTTP.dll file instead of the WinHTTP5.dll file. For more information, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/aa384276.aspx (http://msdn2.microsoft.com/en-us/library/aa384276.aspx)
If the original WinHTTP5.dll file was not unregistered when you installed Windows 2000 SP3 or a later service pack or when you installed Windows XP SP2, the server will continue to use the original WinHTTP5.dll file. If this behavior occurs, you will experience the known issues that were addressed in the hotfix. If you installed Windows 2000 SP3 or a later service pack, or if you installed Windows XP SP2, search for the WinHTTP.dll file. If the WinHTTP.dll file is in the same folder as the WinHTTP5.dll file, follow these steps:
  1. Use the following command to unregister the WinHTTP5.dll file:
    regsvr32 C:\WINNT\system32\winhttp5.dll /u
  2. Use the following command to register the WinHTTP.dll file:
    regsvr32 C:\WINNT\system32\winhttp.dll

Hotfix information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version        Size     File name
   --------------------------------------------------------
   08-Mar-2004  17:22  5.0.2613.1004  298,936  Winhttp5.dll

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section. This problem was first corrected in Windows 2000 Service Pack 3 and in Windows XP Service Pack 2.

MORE INFORMATION

To verify that your application has a handle leak, monitor the Handle count in Microsoft Windows Task Manager. In Task Manager, verify that the application is leaking two handles every time that your application makes a new request. Also, verify that the handles are not released for a long time.

For additional information about the terminology that is used to describe Microsoft product updates, click the following article number to view the article in the Microsoft Knowledge Base:
824684  (http://support.microsoft.com/kb/824684/ ) Description of the standard terminology that is used to describe Microsoft software updates

APPLIES TO
  • Microsoft Windows HTTP Services 5.0, when used with:
    • Microsoft Windows XP Service Pack 1
    • Microsoft Windows 2000 Advanced Server
    • Microsoft Windows 2000 Datacenter Server
    • Microsoft Windows 2000 Professional Edition
    • Microsoft Windows 2000 Server
Keywords: 
kbbug kbfix kbqfe kbwinxpsp2fix kbwinxpsp1fix kbwinxppresp2fix KB838098
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support