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
error:
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
- static private SHDocVw.IWebBrowser2 spBrowser;
- static private SHDocVw.IShellWindows m_spSHWinds = null;
- public string LoadPage()
- {
- try
- {
- m_spSHWinds = new ShellWindowsClass();
- int cnt = m_spSHWinds.Count;
- return cnt.ToString();
- }
- catch (Exception e)
- {
- Debug.WriteLine(e.Message);
- return e.Message;
- }
- }
Thanks,
Raghavendra.