BUG: Memory Leak in InternetOpenUrl Function in ActiveX SDK

Last reviewed: October 9, 1997
Article ID: Q174897
The information in this article applies to:
  • Microsoft ActiveX SDK, version 1.0

SYMPTOMS

A memory leak occurs when the InternetOpenUrl function is used.

RESOLUTION

If the URL in use is for the HTTP protocol, InternetConnect, HttpOpenRequest, and HttpSendRequest can be substituted for InternetOpenUrl, avoiding the problem.

EXAMPLE

The following code fragment:

   hURL = InternetOpenUrl( hSession, "http://server/document.htm", NULL, 0,
    NULL, 1 );

could be changed to the following:

   hConnect = InternetConnect(hSession, "server",
    INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP,
    NULL, NULL);
   hRequest = HttpOpenRequest(hConnect, NULL, "/document.htm", NULL, NULL,
    NULL, NULL, NULL);
   HttpSendRequest(hRequest, NULL, NULL, NULL, NULL);

STATUS

This bug has been fixed in Internet Explorer 4.0 and the Internet Client SDK.

Keywords          : AXSDKWinInet
Technology        : kbInetDev
Version           : WINDOWS:1.0
Platform          : WINDOWS
Issue type        : kbbug


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 9, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.