System.UnauthorizedAccessException on a new none develop Computer | error: 80070005

Add-in Express™ Support Service
That's what is more important than anything else

System.UnauthorizedAccessException on a new none develop Computer | error: 80070005
System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070005. 
Ofear Hadad




Posts: 10
Joined: 2012-11-06
I made a toolbar with capture button, when I click it it's capturing the screen
it's working good on my develop computer and any computer that "Add-in-express extension to VS" is installed on.

BUT! on a new win7 computer it's failed to complete the capturing.

BTW: I'm installing the Debug *.msi after I build the setup wizard

Error Below...
It's seems that something is missing on a regular user computer..
Maybe it's something that VS adds to the system or something that the "add-in-express" adds to the system..

I saw that 9BA05972-F6A8-11CF-A442-00A0C90A8F39 is for the "Interop.SHDocVw"
I'm using it to define the active IE browser

One example(I have a few):

            SHDocVw.WebBrowser m_browser = null;

            SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass();
 
            //Find first availble browser window  .
            //Application can easily be modified to loop through and capture all open windows.
            string filename;
            foreach (SHDocVw.WebBrowser ie in shellWindows)
            {
                filename = Path.GetFileNameWithoutExtension(ie.FullName).ToLower();
    
                if (filename.Equals("iexplore"))
                {
                    m_browser = ie;
                    break;  
                }
            }


THE ERROR:

Unhandled exception has occurred in a component in your application. If you click Continue, the application will ignore this error and attempt to continue.

Retrieving the COM class factory for component with CLSID{9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070005

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Retrieving the COM class factory for component with 
CLSID {9BA05972-F6A8-11CF-A442-00A0C90A8F39} failed due to the following error: 80070005.

at KowzerIEAddon.Helpers.ScreenShot.CaptureRect(Rectangle rect, Rectangle resolution, Point formFixed)
at KowzerIEAddon.KowzerIEToolBar.GetRectSize(Rectangle stub, Point resPoint)
at KowzerIEAddon.Helpers.WorkArea.SaveSelection(Boolean showCursor, Object sender)
at KowzerIEAddon.Helpers.WorkArea.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow  .OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow  .WndProc(Message& m)
at System.Windows.Forms.NativeWindow  .Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************
mscorlib
   Assembly Version: 2.0.0.0
   Win32 Version:  2.0.50727.5456 (Win7SP1GDR.050727-5400)
   CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
KowzerIEAddon
   Assembly Version: 1.0.0.0
   Win32 Version:  0.0.0.0
   CodeBase: file:///C:/Program%20Files%20(x86)/Kowzer/KowzerIEAddon/KowzerIEAddon.DLL
----------------------------------------
AddinExpress.IE
   Assembly Version: 8.1.5065.0
   Win32 Version:  8.1.5065.0
   CodeBase: file:///C:/Program%20Files%20(x86)/Kowzer/KowzerIEAddon/AddinExpress.IE.DLL
----------------------------------------
System.Windows.Forms
   Assembly Version: 2.0.0.0
   Win32 Version:  2.0.50727.5460 (Win7SP1GDR.050727-5400)
   CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
   Assembly Version: 2.0.0.0
   Win32 Version:  2.0.50727.5456 (Win7SP1GDR.050727-5400)
   CodeBase: file:///C:/windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
   Assembly Version: 2.0.0.0
   Win32 Version:  2.0.50727.5462 (Win7SP1GDR.050727-5400)
   CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
   Assembly Version: 2.0.0.0
   Win32 Version:  2.0.50727.4927 (NetFXspW7.050727-4900)
   CodeBase: file:///C:/windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
Interop.SHDocVw
   Assembly Version: 1.1.0.0
   Win32 Version:  1.1.0.0
   CodeBase: file:///C:/Program%20Files%20(x86)/Kowzer/KowzerIEAddon/Interop.SHDocVw.DLL
----------------------------------------
Microsoft.mshtml
   Assembly Version: 7.0.3300.0
   Win32 Version:  7.0.3300.0
   CodeBase: file:///C:/windows/assembly/GAC/Microsoft.mshtml/7.0.3300.0__b03f5f7f11d50a3a/Microsoft.mshtml.dll
----------------------------------------
System.Windows.Forms.resources
   Assembly Version: 2.0.0.0
   Win32 Version:  2.0.50727.5420 (Win7SP1.050727-5400)
   CodeBase: file:///C:/windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_he_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------



EDIT 1:
blue
Posted 06 Nov, 2012 01:12:05 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello Ofear,

I suppose the issue occurs only if IE is run in Protected Mode. Can you please confirm this? Note that when you run IE via "Run as administrator" (e.g. you run IEXPLORE.EXE from VS started via "Run as administrator"), IE is run without Protected Mode. If the issue relates to Protected Mode only, I suggest that you read Understanding and Working in Protected Mode Internet Explorer at http://msdn.microsoft.com/en-us/library/bb250462(VS.85).aspx.


Andrei Smolin
Add-in Express Team Leader
Posted 06 Nov, 2012 04:48:01 Top
nsoft test




Posts: 10
Joined: 2012-11-06
Yes, it's a protected mode issue.

I just want to get a few events
I want to know when and where the user clicked and when the winform is not on focus.

Do you have something else except this website?
Is there some example that can help us understand this issue?

Did you evet had this isuue? and what have you done?
If someone have a C# example it will be great!
Thanks!
Posted 26 Nov, 2012 05:15:15 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hello Ofear,

You can use the 'GetModulesByTypeName' static method of iemodule to get all add-on instances which work in the same integrity level. Then you can capture the screen in each module directly by calling a public method.
Posted 26 Nov, 2012 05:53:10 Top