Home » Microsoft Technologies

ActiveX 'Not Available' from 'Control name is not available' shim workaround


We've implemented a .NET WinForms UserControl which is hosted in IE as an ActiveX control through the use of COM Interop. However, in IE7 and IE8, the Info Bar pops up with the message:
The website wants to run the following add-on: 'Not Available' from 'Control name is not available'
We want it to display our control and publisher name instead. This is similar to this problem:

where Jialang Ge suggested:
Is your ActiveX control developed in native code or .NET? If it's in .NET, a possible solution is to make a shim for it.

Does anyone have more information on this shim approach? Is it related to mscoree.dll? Does it replace it?

15 Answers Found


Answer 1


The idea is shim  is to write a native  ActiveX control, and in the native one, host Winform controls. Then you sign the native dll.
I'm looking for solutions other than shim, because this solution  looks complex and ugly. I will update you about my findings.

Jialiang Ge


Answer 2


Thanks for your help! Looking forward to your updates.

Answer 3

Hello FocusStealer

Sorry for the delayed response. Could you please run  signtool /verify command upon your signed dll? What do you see?

Jialiang Ge

Answer 4


When I run
signtool verify MyAssembly.dll
it says
SignTool Error: The signing certificate is not valid for the requested usage.
        This error sometimes means that you are using the wrong verification
        policy. Consider using the /pa option.
SignTool Error: File not valid: MyAssembly.dll

Then when I run
signtool verify /pa MyAssembly.dll
it says
Successfully verified: MyAssembly.dll

Answer 5

Hello Jialiang Ge,

Any ideas? I can see from the above results that my assembly can only be verified using the "Default Authenticode" verification policy, and not by the "Windows Driver" verification policy.

This MS document says that IE is indeed using the "Default Authenticode" verification policy:

So why is our control  and publisher  name not displayed? Is it because IE is displaying mscoree.dll's name instead, and if so, how do we solve that?

Answer 6

Sorry, FocusStealer. I did not have enough findings to be shared with you. Possibly you can try the Internet Explorer Extension Development forum:
, in which there are a lot of IE extension dev experts.

Jialiang Ge

Answer 7

Hi IE Extension Devs,

Does anyone have a solution  to my problem  above?

To Jialiang Ge: Thanks for the help. Even though it didn't lead to a solution, the effort is appreciated.

Answer 8

Hi FocusStealer,
Were you ever able to find a solution  to your problem? I have an ActiveX written in C#, signed (shows as verified in add-on  management) but warning bar  in IE still says 'Not Available' from 'Control Name is not available'. SignTool verify suceeds with authenticode policy. I'm stumped....

Answer 9

Hi MHale,

Unfortunately not. I have found some more information, but no solutions. The consensus seems to be that the 2 strings above are actually from mscoree.dll (the .NET runtime engine) rather than from your C# assembly itself. If that is the case, I would think the only way this could be solved is if mscoree.dll retrieved the publisher info  from our assemblies and forwarded it to IE. Would anyone from Microsoft care to comment?

Answer 10


We FINALLY got this figured out... The problem  is just as you described: mscoree.dll is registered for the CLSID of the managed dll. There is actually a wizard available from microsoft  used to create a native  C++ com  shim. Details here. The wizard is designed for working with Office add-ins but was quite easy to adapt for an IE activeX control. Our native dll  (the shim) is Authenticode signed and finally shows the correct publisher  and control  name - it's sole purpose is to create the app domain for and load the managed control. (Instead of IE loading via mscoree)
Steps we used: the wizard requires the managed DLL to implement IDTExtensibility2 (extensibility.dll), so we implemented  the interface without fleshing out the individual methods. Once the shim  was generated, we removed the extensibility reference and IDT interface. We modified the generated shim (C++) by removing the pointer refenerces to the IDT methods.
Our installer now registers the shim as a com component, instead of the managed DLL. Ugly hack but works like a charm! I'm surprised there's not more information  on how to do this or a wizard to generate the shim specifically for IE.
Let me know if you need any more info. Good luck!


Answer 11

That's great! I suppose that's what Jialiang Ge meant by "complex and ugly". I'll try it out nonetheless, an ugly solution  is still better than no solution.


Answer 12

We ran into some performance issues with the shim  DLL and have abandoned it for now. Instead we're setting up our clsid and our domain as an approved domain in the registry (during install) to prevent the security warning from coming up at all. It's not a thoroughly tested solution, but it's working for now.

Answer 13

That's unfortunate. We haven't had time to try the shim  wizard ourselves yet.

Is your new approach  the Per-Site ActiveX Controls method?

Thanks for the heads-up!

Answer 14

Hi MHale,

Unfortunately not. I have found some more information, but no solutions. The consensus seems to be that the 2 strings above are actually from mscoree.dll (the .NET runtime engine) rather than from your C# assembly itself. If that is the case, I would think the only way this could be solved is if mscoree.dll retrieved the dat publisher info  from our assemblies and forwarded it to IE. Would anyone from Microsoft care to comment?

I've been always concerned about it, Thanks very much! It's long, Anyone have got the solution? I've got the same problem.

Answer 15

Hi Microsoft Developers,


This is a problem  seen by many and hasn't been found to have a solution.

I recently hit this and have been frustrated trying to understand the issue.


Can someone please help?





My application has to support multiple languages and should be able to switch the language on run time. For that purpose I am using LocalizationExtension from codeplex ( http://wpflocalizeextension.codeplex.com/ ) I am using Ribbon Contorl in my application. I am creating ribbonCommands as window resource and Binding the LableTitle and other properties withLocalizationExtension class.

                                LabelTitle="{lex:LocText Key=SwitchLanguage,Dict=LanRes}"
                                ToolTipTitle="{lex:LocText Key=SwitchLanguage,Dict=LanRes}"
                                LargeImageSource="{lex:LocImage Key=ChangeLanguage,Dict=LanRes}"/>

Then assigning it to button Command property as static resource. 

<rb:RibbonButtonx:Name="EnglishButton"Command="{StaticResource SwitchToEnglishCommand}"Click="EnglishButton_Click">

Here is my RibbonCommandExtended class.

publicclass RibbonCommandExtended : RibbonCommand
            private ICommand m_command;
            public ICommand Command
                get { return m_command; }
                    m_command = value;
                    if (m_command != null)
                        this.CanExecute += UsCanExecute;
                        this.Executed += UsExecuted;
                        this.CanExecute -= UsCanExecute;
                        this.Executed -= UsExecuted;
            privatevoid UsExecuted(object sender, ExecutedRoutedEventArgs e)
            privatevoid UsCanExecute(object sender, CanExecuteRoutedEventArgs e)
                e.CanExecute = Command.CanExecute(e.Parameter);

When my program starts, then the ribbon control picks the right language strings and images. But when I change the language on runtime then I could't see any change in ribbon control localized text and image. Because the RibbonCommand's LabelTitle, LargeImageSource and all other properties are not Dependency properties. 

Have someone solved the issue already? Or is there any other way rather then LocalizationExtension to make my application localized so that it fulfills my requirements?



I have a problem displaying MHT content in my webbrowser control (IE7/IE8)
It works if I open the .mht file from my harddisk like so:

myWebbrowserControl.Navigate "c:\test.mht" 

But I need to display the MHT content that is in a string variable.
So instead opening the MHT content from harddisk I need to display the MHT from a string.

The MHT string looks like this :

From: <saved with Windows Internet Explorer 8>
Subject: Welcome to my website
Date: Sat, 14 Aug 2010 22:43:27 +0200
MIME-Version: 1.0
Content-Type: multipart/related;
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5931

This is a multi-part message in MIME format.

Content-Type: text/html;
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.mywebsite.com

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D=20
"urn:schemas-microsoft-com:vml" xmlns:o =3D=20
"urn:schemas-microsoft-com:.....  (+base64)

I try to display the string like so :

myWebbrowserControl.Navigate "about:blank"
myWebbrowserControl.Document.Write testMHT 

This displays the source - but it doesnt render the MHT string.
 Thank you


I have a simple webpage that starts an ActiveX control. Here’s the code:

<script language="JavaScript" type="text/javascript">
   try {
      document.write("<object classid='clsid:1D980DC8-9C45-11D3-9C5C-00A13234F0A2' id='myActiveX' name=' myActiveX'  width='0' height='0'></object>");
      var bReturn = myActiveX.StartControl();
   catch (e) {
      document.write('Failed<br>' + e.name + '<br>' + e.message);

This works well when I call this page directly from Internet Explorer on Windows XP, 7 & server 2003

I created a .NET form in Visual Studio, and added a .NET WebBrowser Control from the toolbox. I set the URL of the WebBrowser to call the same web page.

I complied it & ran the executable. This works well from Windows XP & server 2003, but fails in Windows 7. Here’s the JavaScript error message:

Object doesn't support this property or method

Why would the ActiveX control work when calling directly from Internet Explorer, but not from within a WebBrowser control in Windows 7?

Thanks for reading.


Hello, I am quite new to ATL ActiveX.

May I ask how to build an ActiveX control in C++ doing that when the control is called by JavaScript, the webpage will be printed in landscape by default.

As I am a newby, would you kindly enough to show me any tutorial which is step by step to teach me building an ATL or MFC ActiveX control. Any doc, any reference or any useful link would be highly appreciated.  And code sample is better.

I have been searching, but some websides I found it just shows me how to build a graphic activex control which is not my case.

By the way, I am using VS2008. Thanks!


When the "Enable memory protection to help mitigate online attacks" security option is checked any ActiveX controls I try to install crash. This has nothing to do with the controls themselves because if you wait (upto a minute) at the following dialog
Do you want to install this software?
Name: ...
Publisher: ...
Install, Don't Install

you get the following error:
The instruction at "0x08257638" referenced memory at "0x08257638". The memory could not be "written".

This even happens with a Microsoft ActiveX control! Has anybody else had this problem? I have been able to replicate it on several machines (although it must be noted that it wasn't a problem all of them). The solution to the problem is to uncheck the security feature "Enable memory protection to help mitigate online attacks" and then no problems occur.


Hello everybody,

i have a COM - Application (VS 2005) where i use side-by-side configuration for the mfc and atl DLL´s.

This works fine. I can use my application directly from an usb stick without installing any redistributables or having admin rights in Windows.

Unfortunately i have to install a shim database file (sdb - File) for using my application in Windows Vista or 7. For this i need to have admin right on the machine.

Is there an easy way to use side by side configuration and a shim database file without having admin right´s or installing anything??


Thanks in advance!!


When a Shim is installed it gives an ARP entry. I want to add the shim in my package after remediation and do not want the shim (sdb) entry in the ARP. What needs to be done to achieve this?


I have custom control(i.e.popup) on page. It was overlapping with 3D view(or hidden behind 3D view). So I used AddControlElement which adds IFRAME "shim" for each control. but It's not working in firefox. Following is my code:


//This function Help to add control over the 3D view of MAP

function AddControlElement(el) {
    var shim = document.createElement("iframe");
    //shim.id = "controlFrm" + i;
    shim.id = "controlFrm";
    shim.frameBorder = "0";
    shim.style.position = "absolute";
    shim.style.zIndex = "1";
    shim.style.top = el.offsetTop + "px";
    shim.style.left = el.offsetLeft + "px";
    shim.width = el.offsetWidth;
    shim.height = el.offsetHeight;
    el.shimElement = shim;
    el.parentNode.insertBefore(shim, el);


Hi every body does it possible to Profiling ActiveX Control with .net Profiling or is another way to capture functions and events of a ActiveX Control?

thanks a lot.



I've used HTML Help workshop to develop a help system for the web.  I've setup a frameset with 2 frames ('left' and 'contents'). The 'left' frame contains a file called 'TOC.htm', with the HTML Help ActiveX control to display the TOC. The default frame in which topics should appear is set as the 'contents' frame, in both the .hhc and TOC.htm files.

However, when I view the frameset in IE7, and click on an item in the TOC, the content that should have been displayed in the 'contents' frame, is displayed in the 'left' frame. Why?

Thanks in advance.

I have an ActiveX control for web created in .net 3.5. When upgrading the framework to 4.0 it stops working. I have tried to create a hello world activeX control with 4.0 and it wouldn't work either. Is it not possible to create ActiveX controls with .net framework 4.0? I have also tried to create windows form control "Hello World" for web but again it doesn't work, though it works under framework 3.5


in the vc 6.0 , we can choose ClassWizard -> Automation -> Add Property

now in the vs 2008 , how?




I have a dedicated UI thread (not the process main thread) that has a message loop and creates a window with the WebBrowser ActiveX control. When the main thread processes it should be able to update the webbrowser control in the other thread. However this fails, because the WebBrowser control runs in a STA and ATL's CAxHostWindow gives me an assert about invalid thread IDs.


I want to call this on the control:


The main thread is loading a bunch of DLLs and after each DLL has been loaded the webbrowser control should display some message. So thats why its sitting on a seperate thread to run interdependent from the main threads processing.


Any ideas how to access the control from another thread?


in the vc 6.0 we can use the class wizard on the view menu

in the vs 2008 ,the msdn library already describes how to add a stock property  to an ActiveX control using the Add Property Wizard:

To add the stock Caption property using the Add Property Wizard

Load your control's project.

In Class View, expand the library node of your control.

Right-click the interface node for your control (the second node of the library node) to open the shortcut menu.

From the shortcut menu, click Add and then click Add Property.

This opens the Add Property Wizard.

In the Property Name box, click Caption.

Click Finish.

For step 5, the msdn describes:

Property type

Sets the type of property you are adding. For MFC dispinterfaces, provide your own type or select from the predefined list. If you provide a stock implementation of a property, Property type is set to the stock type and is unavailable for change.

Property name

Sets the name of the property. For MFC dispinterfaces associated with ActiveX controls, you can supply your own name or you can select a stock property name from the predefined list. If you provide your own property name, the Stock implementation type is unavailable. See Stock Properties for a description of the properties in the list.

yesterday in the Add Property Wizard, i find the Stock implementation,

but today in the Add Property Wizard, i  can not set the Stock implementation because the implementation type is gone, i just can't find it , so i write this and hope someone can tell me what had happened.

but just the same time when i am to submit this, i open the Add Property Wizard, things happened, i find the Stock implementation in the implementation type again.

now can someone tell me what happened?





I am developing a Windows Form application using MS Visual C# 2010 Express and am having trouble with an ActiveX control. To give some background on what I am attempting to do: We have a number of Sony network cameras at remote locations, which we use for customer service, monitoring and security. The cameras stream video over our network and come with built-in webservers such that you can view the video stream in IE via a downloadable ActiveX plug-in provided by Sony. In addition to the cameras, we use VNC clients for remote desktop viewing at various locations.

The goal of my application is to integrate two video feeds per location, as well as VNC client functionality into one Windows Form application. Locations will be selectable via a combobox control. When the user selects a new location, the form will be refreshed to show the video and desktop for that location. The problem I am having right now is with the Sony ActiveX control. I have successfully imported it into the Visual Studio toolbox and added it to my form. If I set the ParamCamAddress property on the control to the IP address of one of our cameras in the Designer (i.e., the IP address is set at start-up / hard-coded) and run the application, the ActiveX control displays the video feed as expected.

The problem is that I need to be able to change that parameter and reload/refresh the control so that the video feed from the new location selected will display. If I do something like this when the combobox event fires, it doesn't work:

private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  Location location = _locDict[comboBox1.SelectedItem.ToString()];
  this.axSonySncRz25View1.ParamCamAddress = location.CameraIp;

I know that's too simple, so I looked at the Visual Studio-generated code in Form.Designer.cs. I find this relevant code in the InitializeComponent() method:

this.axSonySncRz25View1 = new AxSonySncRz25ViewLib.AxSonySncRz25View();

this.axSonySncRz25View1.Enabled = true;
this.axSonySncRz25View1.Location = new System.Drawing.Point(0, 0);
this.axSonySncRz25View1.Name = "axSonySncRz25View1";
this.axSonySncRz25View1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axSonySncRz25View1.OcxState")));
this.axSonySncRz25View1.Size = new System.Drawing.Size(880, 600);
this.axSonySncRz25View1.TabIndex = 2;


I don't see where the IP address I specified in the ActiveX control properties in VS Designer is being set, but it works. I've searched through MSDN and online for general information about ActiveX/.NET interoperability, but haven't come up with much regarding how to reload or refresh OCX controls (that I understand). I've also tried using the code above in various arrangements in my Form.cs code, but to no avail. I just don't understand the principles involved here to know what to do. If someone can point me in the right direction or provide some coding advice, I would be very appreciative.



I am learning MFC , the compiler is vs 2008.

Now i have a question about the activex controls.

I have made an clock activex control using the MFC Activex Control  Wizard .

Then i add two stock properties , a custom method and a custom event to it.

These stock properties are ForeColor and BackColor.  Because i want to modify the backcolor and  forecolor in the property page of the activex control ,so i add this here:

BEGIN_PROPPAGEIDS(Cv18e1_ClockCtrl, 2)

and in the body of OnDraw(), i add these :

void Cv18e1_ClockCtrl::OnDraw(
   CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)
 if (!pdc)

 // TODO: Replace the following code with your own drawing code.
 //pdc->FillRect(rcBounds, CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH)));
 CBrush brush(TranslateColor(GetBackColor()));
 pdc->FillRect(rcBounds, &brush);
 CTime time = CTime::GetCurrentTime();
 if(0 == time.GetSecond())
 CString str = time.Format(_T("%H:%M:%S"));
 pdc->TextOut(0, 0, str);

At first i test it in the tstcon container, everything is fine.

1.But when i test it in a windows form applition in VB, and modify the BackColor and ForeColor in the property page of the activex control, it doesn't work, the backcolor and forecolor doesn't change(when i modify these in the property page privided by VB, it works and the control's backcolor and fore color change).

2.It is the same situation when i test it in a MFC Application based on dialog

3.And thereis another question, in the MFC Application based on dialog, i add the activex control by the wizard, and the wizard create a class for it .But in the class view, i can't find these two method: SetBackColor(OLE_COLOR),  SetForeColor(OLE_COLOR). Because i have add these two stock properties : BackColor , ForeColor, why i can't find these two method? Now i want to use these two method ,how?

In VC 6.0 , i can find these two method , and has no problem , why it is so hard in VS 2008? Anyone can help me?




I'm working at a Java project embedding Internet Explorer using JExplorer via JNI.

The project wants the Internet Explorer scroll bars to resemble the project's scroll bars. Now I'm seeking for a method to skin all of a process' windows to be able to owner draw the scrollbars of IE.

Is this possible? How?

I've been trying to subclass the Internet Explorer window using a self-made WindowProc implementing WM_NCCALCSIZE, WM_NCPAINT ect. in C++, but that's far too much ado.

Can someone enlighten me on a simple way to sub class any of a process' windows to be able to owner draw the scroll bars?

Any help on this is appreciated!

Axel Dahmen




i'am writing an Sidebar Gadget in Windows 7 that connects to an remote Desktop with the Microsoft RDP ActiveX Control.

All is working fine, but before the opened there comes an Security Warning that the Webpage would open an Remote Connection.

It is not the Security warning for an unknown Publisher.


Is there any chance to disable this warning or set this local Gadget File to secure zone ? 

Can I autorize the Gadget as Secure ?

 Screenshot: http://www.fiebach.de/vbox_warning.jpg


Thanks in advance



I have C# ActiveX and I need use it in MFC 6.0. I put my ActiveX in MFC form and when I'm trying to add new member variable message apears  "The ActiveX is not registered properly, or its type library version number is incorrect ...."

As ActiveX i use example from http://www.codeproject.com/KB/cs/DotNetActiveX.aspx but I don't know how to change loadActiveX method in order to get and set control properties on a dialog form.



I have written an ActiveX control in C# and have registered  using regasm command on the client . Then as a next step I have made a .cab installer and have signed my .cab file and ActiveX .dll file with a certificate. When I request the html page from my browser to the web server the installation works fine with default security settings of IE, but at the end it seems that nothing is installed.The ActiveX control gets downloaded to the local machine from the Web server which I could see in the C:\WINDOWS\Downloaded Program Files but the status is “Unknown” instead of "Installed" as like other Active X controls.

Moreover if I try to invoke any one of the method of Active X ,it says,"Automation server can't create object"

Can anyone help me out in resolving the issue.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure