By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,384 Members | 714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,384 IT Pros & Developers. It's quick & easy.

ShDocVw in C#

P: 2

I am developing a screen reader application in C#. So, I hooked the system using SetWindowsHookEx Win32 API. Now I need to access the information from Internet Explorer. So, I am using ShellWindowsClass in ShDocVw.dll, I could be able to work with ShellWindowsClass seperately, but If I use this in Hooking applciation I am getting an error, error is shown below

Retrieving the COM class factory for component with CLSID {...} failed due to the following error: 80070002.

Code I have written is:

Expand|Select|Wrap|Line Numbers
  1. static private SHDocVw.IWebBrowser2 spBrowser;
  2.         static private SHDocVw.IShellWindows m_spSHWinds = null;
  3.         public string LoadPage()
  4.         {
  5.             try
  6.             {
  7.                 m_spSHWinds = new ShellWindowsClass();
  8.                 int cnt = m_spSHWinds.Count;
  9.                 return cnt.ToString();
  10.             }
  11.             catch (Exception e)
  12.             {
  13.                 Debug.WriteLine(e.Message);
  14.                 return e.Message;
  16.             }
  17.         }
Any help is appreciated for above problem.

Apr 19 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.