You are currently offline, waiting for your internet to reconnect

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

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.
This problem occurs because both the Windows and Visual Basic runtimes do not support configuring SxS execution of Visual Basic 6.0 ActiveX controls.
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: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:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">	<assemblyIdentity type="win32" name="control.ocx" version="" processorArchitecture="x86"/>	<file name="control.ocx">		<comClass description="Sub control" clsid="{76548630-0CC8-48E4-B471-A9001865AE65}" 			miscStatus="recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst"			progid="Control.TextBox" threadingModel="Apartment"			tlbid="{8A1ADF05-8164-4D5B-9267-FA74E601D826}"/>		<typelib tlbid="{8A1ADF05-8164-4D5B-9267-FA74E601D826}" version="1.0" helpdir=""/>	</file></assembly>
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:
miscStatusThe default status flags that are obtained when you pass 0 for the dwAspect argument to the OleRegGetMiscStatus API
miscStatusIconMaps to DVASPECT_ICON
miscStatusThumbnailMaps to DVASPECT_THUMBNAIL
miscStatusDocPrintMaps to DVASPECT_CONTENT
miscStatusContentMaps to DVASPECT_CONTENT
For each aspect, the following set of flags can be specified as a comma-separated list. Do not use SPACE characters (" ") 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.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Article ID: 828629 - Last Review: 06/20/2014 08:26:00 - Revision: 2.0

  • kbhotfixserver kbqfe kbwinxppresp2fix kbfix kbbug KB828629