Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Using the VirtualizeRegisterTypeLib Fix

Published: June 11, 2010

Updated: June 11, 2010

Applies To: Windows 7, Windows Vista

This section includes information about using the VirtualizeRegisterTypeLib compatibility fix, including the usage and API-related information.

VirtualizeRegisterTypeLib

The VirtualizeRegisterTypeLib compatibility fix enables an application to register a COM component’s type library at runtime, instead of at install time, by redirecting the type library registration from HKEY_CLASSES_ROOT to HKEY_CURRENT_USER, which enables the application correctly function as a Standard User.

noteNote
Issues that occur due to the registration of the COM component itself must be resolved by using the VirtualizeHKCRLite compatibility fix.

Investigating the Issue

You can verify whether the VirtualizeRegisterTypeLib compatibility fix will resolve your registration issues by using a registry monitoring tool, such as the Sysinternals' Process Monitor to record your issue. After recording the issue, you can review the ACCESS DENIED results for the HKEY_CLASSES_ROOT and Typelib functions. You can also review the stack for the Access Denied call for the RegisterTypeLib API.

noteNote
We recommend that you try applying the VirtualizeHKCRLite compatibility fix before attempting the registry monitoring process, as the VirtualizeHKCRLite fix is known to correct many of the common registry issues.

Intercepted APIs

The RegisterTypeLib API is intercepted and replaced with a call to the RegisterTypeLibForUser API.

Fixing Your Code

As a general rule, applications should register COM components and type libraries at installation, when the installer is given elevated privileges. For applications that must install components at runtime, the installation should be done on a per-user basis, instead of a per-computer basis. For example, the call to the RegisterTypeLib function should be replaced with a call to the RegistryTypeLibForUser function.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.