Microsoft KB Archive/828629

= FIX: Windows side-by-side execution is not supported for Visual Basic 6.0 ActiveX controls =

Article ID: 828629

Article Last Modified on 10/25/2005

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Enterprise Edition Service Pack 5
 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Windows XP Professional
 * Microsoft Windows XP Service Pack 1a

-





SYMPTOMS
With Microsoft Windows XP and later versions, you can run Microsoft Component Object Model (COM) DLL modules in side-by-side (SxS) mode. With SxS, different versions of a COM DLL to co-exist in the same computer environment without conflict. This behavior occurs by using .manifest files that specify how a program may bind to a particular COM DLL. Microsoft Visual Basic 6.0 ActiveX controls are essentially COM DLL modules with .ocx file name extensions. If you try to configure these modules for SxS operation in Windows XP, you receive the following error message:

Runtime Error '336' Component not correctly registered.



CAUSE
This problem occurs because both the Windows and Visual Basic runtimes do not support configuring SxS execution of Visual Basic 6.0 ActiveX controls.



RESOLUTION
To fully resolve this problem you must have both of the following:
 * The version of the Visual Basic runtime that is included with Visual Basic 6 Service Pack 6 (SP6)
 * Windows XP Service Pack 2 (SP2)

For additional information about how to obtain the latest Visual Basic runtime, click the following article number to view the article in the Microsoft Knowledge Base:

290887 VBRun60sp6.exe installs Visual Basic 6.0 SP6 run-time files

To obtain Windows XP SP2, visit the following Microsoft Knowledge Base Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;windowsxpsp2

If you cannot install Windows XP SP2, you can obtain the Windows XP fix as a hotfix. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

843524 FIX: Side-by-side COM DLL module manifest for Visual Basic 6.0 ActiveX Controls is overridden by the registry in Windows XP



MORE INFORMATION
To enable this fix, you must add fields to the .manifest files. The following is a sample .manifest file:       Notice that the miscStatus attribute has been added. Now five new attributes are available on the assembly element or on the comClass element to represent the various DVASPECT values that are available:

For each aspect, the following set of flags can be specified as a comma-separated list. Do not use SPACE characters (&quot; &quot;) but the flags can be mixed-case. These elements are taken from the OLEMISC flag enumeration.

Notice that you must also use the tlbid attribute in the assembly element or in the comClass element to indicate what type library the COM class comes from for the runtime to resolve it correctly.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Keywords: kbbug kbfix kbqfe kbwinxppresp2fix kbhotfixserver KB828629

-

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

© Microsoft Corporation. All rights reserved.