AxSHDocVw.AxWebBrowser error - "queryinterface for interface shdocvw.iwebbrowser2 failed"

Posted on 2003-11-12
Last Modified: 2009-12-16

I have a application using webbrower control.  
I am using the following command to display html file in this browser (AxSHDocVw.AxWebBrowser)


I works fine, but if the application is idle for some time and when it tries to call this line again it gives an error

"queryinterface for interface shdocvw.iwebbrowser2 failed"

Please help


Question by:inetworks
  • 2

Expert Comment

ID: 9738698
Is the browser object going out of scope?

Can you provide the code for the method where you call this line? Make sure browser is not a local variable and is a class level variable.

Accepted Solution

inetworks earned 0 total points
ID: 9738925
Thank you. The problem was due to a thread and it is solved now
I Put the thread inside a class and raised an event when thread is completed
to navigate a page to browser control.


Expert Comment

ID: 9739510
Good. :)

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
DateTimepicker 4 38
Anyway to make "All" the default in the dropdown? 6 35
Best resource to learn entity framework 2 32
application restarter  - for an exe that hangs 9 24
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now