FIX: Unable to Update Installed Component with Newer Version

ID: Q167840


The information in this article applies to:
  • Microsoft Internet Explorer (Programming) versions 3.0, 3.01, 3.02


SYMPTOMS

When you navigate between two pages that refer to different versions of the same component, Internet Explorer 3.x may use the version of the component first loaded, for both pages. While Internet Explorer appears to download the new version of the component, it may continue to use the older version.


CAUSE

In an attempt to optimize back and forth navigation between pages, Internet Explorer 3.x may maintain a most-recently-used memory cache of up to 4 viewed pages. This cache includes all the components contained in those 4 pages. The problem described in this article is a negative side effect of this caching mechanism. When the newer component is installed, DllRegisterServer (exported by the component) is called to register the component. Unfortunately, if Internet Explorer has the older component in memory (in the memory cache), DllRegisterServer is called on the component already in memory, essentially re-registering the old component.

Q167230 HOWTO: Detecting when IE holds Controls and Pages in Memory


STATUS

In Internet Explorer 4.0 and later, this 4 page cache is not kept by the browser. ActiveX controls are destroyed when the user navigates away from a web page.


RESOLUTION

In Internet Explorer 3.x, one workaround is to close the browser and revisit the page. Doing this will cause the newer version of the component to display on the page as expected.

If restarting Internet Explorer 3.x is not an option, another workaround may be to assign a new CLASSID to the newer version of the component. This forces IE 3.x to treat the component as an entirely new component not already installed in the system, thereby causing it to download the new version of the component and display it on the page.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Using Internet Explorer 3.x, visit a page that uses Version 1.0 of a component, say Circ3.OCX:
    
    <OBJECT ID="Circ31" WIDTH=100 HEIGHT=51
     CLASSID="CLSID:9DBAFCCF-592F-101B-85CE-00608CEC297B"
     CODEBASE = "http://example.microsoft.com/circ3.cab#Version=1,0,0,0">
     <PARAM NAME="_Version" VALUE="65536">
     <PARAM NAME="_ExtentX" VALUE="2646">
     <PARAM NAME="_ExtentY" VALUE="1323">
     <PARAM NAME="_StockProps" VALUE="15">
     <PARAM NAME="BackColor" VALUE="16711808">
    </OBJECT> 


  2. Visit another page (PAGE2.HTM) that uses Version 2.0 of the same component, that is its CODEBASE tag should look something like CODEBASE="http://example.microsoft.com/circ3.cab#Version=2,0,0,0">


  3. Observe as Internet Explorer 3.x attempts to download the .CAB, as specified in the CODEBASE tag. It brings up the digital certificate, prompting the user to install version 2.0 of the component.


  4. Click Yes to install the newer version, and although Internet Explorer 3.x appears to download the .CAB to disk, it is unable to do so, because the component is still loaded in memory. (This can be misleading because Internet Explorer 3.x does not notify the user of this failure to download the control; however, if you verify the version of the control in the registry, or in the OCCACHE directory, it still indicates version 1.0.)


  5. When the second page is finally loaded, Internet Explorer 3.x continues to use version 1.0 of the component, instead of the specified version 2.0.


  6. Restart Internet Explorer and revisit Page2.HTM. Internet Explorer 3.x prompts the user to download version 2.0 of the control again (remember that it was not able to successfully do this in #4 above).


  7. Click Yes and the page is finally loaded with the correct version (version 2.0) of the component.



REFERENCES

ActiveX SDK Internet Component Download documentation

Additional query words: <OBJECT> object tag

Keywords : kbIE300 kbIE301 kbIE400fix kbIE302 kbCodeDownload kbIEFAQ
Version : WINDOWS:3.0,3.01,3.02
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: January 27, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.