Using ViewerX ActiveX control without system registration
This KB article discusses the use of the SmartCode ViewerX ActiveX control without the need to register them on the target system.

Prior to Windows XP, an ActiveX control had to be registered on the system before it could be used by an application. This registration creates a few issues among which:

  • Registering a control requires administrative rights on a system.
  • Registering a control affects multiple applications as the same DLL is shared among all applications using the same version of the control (some developers refer to this issue as the DLL hell.)
  • An application that unregisters a control will prevent all other applications from using it.

The solution to these issues is to use side-by-side activation, or registration-free components; a concept that is very similar to what was introduced with .NET.

When side-by-side registration is used, two things happen:

  • scvncctrl.dll can be placed in each application's folder and is not shared with other applications.
  • The ActiveX control is not registered in the system wide registry but each application acts as if it had its own registered component.

Enabling this feature is straight-forward with Visual Studio 2005 or newer. Simply open the "References" panel, right-click on the control that you are using and set the Isolated property to True. When this is done, Visual Studio generates a manifest file that is similar to what is shown below. Note that the manifest has to be in the same folder as your application.

Sample manifest:

<?xml version="1.0" encoding="utf-8"?>
<assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assembly.adaptive.xsd" manifestVersion="1.0" 
          xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" 
          xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" xmlns:dsig="" 
          xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:xsi="">
  <assemblyIdentity name="WindowsFormsApplication2.exe" version="" processorArchitecture="x86" type="win32" />
  <file name="scvncctrl.dll" asmv2:size="3410432">
    <hash xmlns="urn:schemas-microsoft-com:asm.v2">
        <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
      <dsig:DigestMethod Algorithm="" />
    <typelib tlbid="{2864468c-765f-4ef3-b8cf-42666c92b545}" version="1.0" helpdir="" resourceid="0" flags="HASDISKIMAGE" />
    <comClass clsid="{62fa83f7-20ec-4d62-ac86-bab705ee1ccd}" threadingModel="Apartment" tlbid="{2864468c-765f-4ef3-b8cf-42666c92b545}" 
              progid="SmartCode.ViewerX.3" description="SmartCode VNC Viewer Control" />