Article ID: 838098
This article has been archived. It is offered "as is" and will no longer be updated.
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.
Service pack informationTo 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:
(http://support.microsoft.com/kb/322389/ )How to obtain the latest Windows XP service pack
260910The 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://support.microsoft.com/kb/260910/ )How to obtain the latest Windows 2000 service pack
http://msdn2.microsoft.com/en-us/library/aa384276.aspxIf 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:
Hotfix informationThe 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
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.
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:
(http://support.microsoft.com/kb/824684/ )Description of the standard terminology that is used to describe Microsoft software updates