none
SHDocVw.ShellWindowsClass, Retrieving the COM class factory for component with CLSID{9BA05972-F6A8-11CF-A442-00A0C90A8F39}failed

    Domanda

  • Hi,

       I'm developing a BHO by using the BandObject library & Interop.SHDocVw 1.1.0.0. Everything working fine with Windows-XP. But in Vista - ultimate or business i'm getting error while try to access the BHO(i've installed it successfully). The error i'm getting is,

    ERROR(through event viewer):
    ------------------------------------------
    The machine-default permission settings do not grant Local Activation permission for the COM Server application with CLSID
    {9BA05972-F6A8-11CF-A442-00A0C90A8F39} to the user mit-PC\admin SID (S-1-5-21-2864316024-2713915716-3093700643-1001) from address LocalHost (Using LRPC). This security permission can be modified using the Component Services administrative tool.

    ERROR (getting directly through messagebox):
    -------------------------------------------------------------------
    MyToolbar Explorer_DocumentComplete : at MyBHO.MyToolBar.Explorer_DocumentComplete(Object pDisp, Object& URL)
    Source:MyBHO
    Message:Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070002.

    Code part:
    --------------

    IEnumerator windows = new SHDocVw.ShellWindowsClass().GetEnumerator();
                    do
                    {
                        if ((windows.Current is SHDocVw.IWebBrowser2) && ((windows.Current as SHDocVw.IWebBrowser2).HWND == Explorer.HWND))
                        {
                            IntPtr hwnd; ((windows.Current as SHDocVw.IWebBrowser2).Document as IOleWindow).GetWindow(out hwnd);

                            if (IsWindowVisible(hwnd))
                            {
                               
                                onRemove = new CacheItemRemovedCallback(this.RemovedCallback);
                                AppCache.Cache.Add(hwnd + "basket", basket, null, DateTime.Now.AddSeconds(12000), Cache.NoSlidingExpiration, CacheItemPriority.High, onRemove);
                               
                            }
                        }
                    }
                    while (windows.MoveNext());

    lunedì 29 settembre 2008 23:44

Tutte le risposte

  • You can't use ShellWindowsClass in Vista with UAC on.

     

    martedì 30 settembre 2008 03:18
  •     Thanks.

       
    I'm using the ShellWindowsClass because i need to get the control over all the TABs which are already opened. Since there is a problem in VISTA with UAC mode ON to use this class, is there any other way to overcome this or what else can be done? I'm developing this BHO in C#.
    martedì 30 settembre 2008 06:42
  • Hi Selvam,

    I know it was a long time ago - but I'm facing now the same problem as you did.

    Did you manage to overcome it ?

    Thanks

    Asi.

    domenica 20 novembre 2011 09:39
  • Hi Selvam,

    I know its been long time. But am facing same problem now and cudn't find exact solution. any hint will be great

    Rgds,

    Pavan


    Pavan N Kumar

    mercoledì 12 settembre 2012 06:56