Microsoft KB Archive/183023

= BUG: Cannot Use Out-Of-Proc Server Instantiated in OBJECT Tag =

Article ID: 183023

Article Last Modified on 10/13/2003

-

APPLIES TO


 * Microsoft Internet Explorer (Programming) 6.0
 * Microsoft Internet Explorer 5.5
 * Microsoft Internet Explorer 5.01
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Explorer 4.0 128-Bit Edition

-



This article was previously published under Q183023



SYMPTOMS
Out-of-process (EXE) components do not work correctly when instantiated through an OBJECT tag in HTML under Internet Explorer 4.0x. Internet Explorer 4.0 appears to instantiate the component but when you access any property or method of the component from script, you get the following error message:

Object does not support this property or method



CAUSE
Internet Explorer does not correctly instantiate out-of-process components (EXEs).



RESOLUTION
If it is not possible to convert your application to an in-process component, there is a limited workaround. The workaround is to use VBScript's CreateObject function instead of the OBJECT tag. You supply the ProgID of your component to CreateObject instead of the CLSID required by the OBJECT tag. You can use CreateObject in an inline script as follows:  Dim MyComp Set MyComp = CreateObject("Project1.Class1")  Please be aware that the above work around has the following caveats:


 * Internet Explorer cannot download your component to the client's machine without an OBJECT tag. You can elect to use the OBJECT tag to perform the download and also do a CreateObject if your component will allow this.
 * You cannot get events from the component created with CreateObject.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
Out-of-process (EXE) components do not work correctly when instantiated through an OBJECT tag in HTML under Internet Explorer.

Steps to Reproduce Behavior

 * 1) Build a Visual Basic 6.0 ActiveX EXE project. Make sure you have at least one property or method in your class.
 * 2) Use Package and Deployment Wizard to generate an Internet Package for your project.
 * 3) Modify the HTM file to add script that calls your property or method from the Window_OnLoad event.
 * 4) Run the HTM file in Internet Explorer.

RESULT: The following error message appears:

Object does not support this property or method.

Keywords: kbbug kberrmsg kbpending KB183023

-

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

© Microsoft Corporation. All rights reserved.