473,546 Members | 2,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Internet Explorer control

Hi everyone

I'm having a couple of problems with the Internet Explorer
browser control. I'm using VS.NET 2003 on Win2k SP4 with IE6.

First, let me briefly describe how it's used in my project.

1. I have a DLL containing a form which hosts the IE
Browser control, using the AxInterop stuff that is
generated when you add a reference to the COM ShDocVw
library. This form is basically just a web browser
which I can control programmaticall y.

Public Sub ShowURL(ByVal sURL As String)
If Not Me.Visible Then Me.Show

Try
browser.Navigat e(sURL)
Catch ex As Exception
System.Diagnost ics.Debug.Write Line(ex.Message )
End Try
End Sub

2. I have a DLL containing a UserControl. Under certain
conditions, this control will make use of the web
browser form described above:

Private Sub ShowDetails( ... )
Dim sDetailsURL As String = ...
...
Dim dlgBrowser As frmBrowser = New frmBrowser
dlgBrowser.Show URL(sDetailsURL )
End Sub

3. I have a DLL containing a form, which uses the
UserControl described above.

4. Finally, there is an EXE which will instantiate the form
and display it.

Okay... on to the problems.

[A] If I open the form (#3 in the above list) in the Forms
Designer, it complains that it can't instantiate the
control (#2):

An exception occurred while trying to create an
instance of MyControlLib.ct lMyControl. The exception
was "File or assembly name AxInterop.SHDoc Vw, or one
of its dependencies, was not found.".

The control works fine at run time though!

I have tried putting a ShDocVw reference in the project
(#3) where the form resides, but this doesn't help.

[b] When the browser control's Navigate function is called
by ShowURL, I get this error:

First-chance exception at 0x7c57e592 (KERNEL32.DLL) in
MyApp.exe: 0x000006BA: The RPC server is unavailable.

Strangely, even though there's a try-catch around the
Navigate call, execution breaks here, and I see the
above error message in a dialog box (the type you
might see when your native C/C++ code segfaults).

I'll paste the stack dump at the end of this message.

Here's the weird part. If I comment out the Navigate
call in ShowURL(), but then allow the user to enter a
URL in a textbox, click on a Go button, and call
Navigate from there... everything works fine.

Any advice would be greatly appreciated. Thanks.

-- graham
The following is the contents of the Call Stack window when
the "RPC server is unavailable" exception occurs.

KERNEL32.DLL!Ra iseException() + 0x55
rpcrt4.dll!RpcR aiseException() + 0x1d
NETAPI32.DLL!Ne tpSetFileSecuri ty() + 0x3db
NTLANMAN.DLL!NP GetResourceInfo rmation() + 0x41d
NTLANMAN.DLL!NP GetResourceInfo rmation() + 0x127
mpr.dll!WNetGet ResourceInforma tionW() + 0xed
mpr.dll!WNetGet ConnectionW() + 0x1b9
mpr.dll!WNetGet ConnectionW() + 0x15f
SHELL32.DLL!Con trol_FillCache_ RunDLLW() + 0x14c0
SHELL32.DLL!SHG etIconOverlayIn dexA() + 0x15369
SHELL32.DLL!SHG etIconOverlayIn dexA() + 0x3531
SHELL32.DLL!She llExec_RunDLLW( ) + 0x3a86
SHELL32.DLL!She llExec_RunDLLW( ) + 0x3d4a
SHELL32.DLL!SHG etIconOverlayIn dexA() + 0x3531
SHELL32.DLL!SHG etFileInfoW() + 0x2f0
SHELL32.DLL!Dll CanUnloadNow() + 0x36
SHDOCVW.DLL!Dll CanUnloadNow() + 0x7f
SHDOCVW.DLL!Dll CanUnloadNow() + 0x309
SHDOCVW.DLL!Dll GetClassObject( ) + 0x4141
SHDOCVW.DLL!Dll GetClassObject( ) + 0x8571
SHDOCVW.DLL!Dll GetClassObject( ) + 0x8166
SHDOCVW.DLL!Hli nkFrameNavigate NHL() + 0x496e
SHDOCVW.DLL!Dll RegisterWindowC lasses() + 0xdf9d
axinterop.shdoc vw.dll!AxSHDocV w.AxWebBrowser. Navigate(string
uRL = "file://c:/foo.txt", System.Object flags =
{System.Reflect ion.Missing}, System.Object targetFrameName
= {System.Reflect ion.Missing}, System.Object postData =
{System.Reflect ion.Missing}, System.Object headers =
{System.Reflect ion.Missing}) + 0x5d bytes


Nov 21 '05 #1
2 3101
Just an update:

1. I'm now seeing the "crash" any time I call Navigate.
It doesn't matter whether I wait for the user to click
a Go button... it dies in exactly the same way.

2. I've eliminated a few layers, just for debugging, so I
am down to two projects:

- a DLL project containing the web browser form
- an EXE project which attempts to instantiate that
form and call its ShowURL function

BTW, I do not believe that the two problems that I
described are closely related... their only relation, IMHO,
is that they both have to do with the IE browser control.

-- graham
Nov 21 '05 #2
> An exception occurred while trying to create an
instance of MyControlLib.ct lMyControl. The exception
was "File or assembly name AxInterop.SHDoc Vw, or one
of its dependencies, was not found.".


Solution: Don't try to instantiate the browser form inside
the usercontrol's New() function.

Instead, I now instantiate the browser form the first time
it is needed. The forms designer now seems to be happy.

-- graham
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2665
by: Raymond H. | last post by:
Hello, I create a vb4 project which can also naviger on Internet via the WebBrowser control which I put on my form. My question is: if this program is installed on a station having already Internet Explorer in it then will it cause an error if version Internet Explorer is the same one as WebBrowser which is in my project? Is it this control...
3
24182
by: Oldbitcollector | last post by:
I'm a still new to visual basic, and I've hit a problem I can't find a workaround for. I'm attempting to open and close an Internet Explorer window using visual basic 6. I've got the open working properly, but for some reason, I can't close the browser when I'm finished with it. Here's the code I'm using for opening and closing...
0
1299
by: MilanB | last post by:
Hello Need to create Windows Control that will be used within Internet Explorer (like ActiveX before). The propose of this control is to implement Internet Explorer interface IAuthenticate. I have never been doing implementing Internet Explorer interface with Windows/AvtiveX control.
7
4489
by: husamal_ahmadi | last post by:
Hi everyBody: I have this question which really drive me cruzy, By using VB.Net: How can I let the internet explorer navigate in the same window either by using win32 API or by using Microsoft Internet Control refreance to my project ? some body toled me to use ShellExcute Function in API but I tried it
0
295
by: Friskusen | last post by:
I have a control library written in Vb.Net and now i am very eager to use the controls with Internet explorer, using the object tag, something like this: <object id="MyButton1" classid="http://Domain/MyControls.dll#MyControls.MyButton" width="195" height="202" > </object> First i uploaded the control library to my homepage, that is i...
3
2330
by: VK | last post by:
Internet Explorer 7 beta 2 preview CNET Editor review: <http://reviews.cnet.com/Internet_Explorer_7_for_XP_SP2_Beta_2/4505-3514_7-31454661-2.html?tag=nl.e415> Summary (my personal review interpretation): "Half stolen from Firefox, half is buggy - including the stolen part". Download:...
1
3498
by: Apu Nahasapeemapetilon | last post by:
Hello and thank you in advance for your help. Can anyone think of a reason why this code would work properly on one PC, but not another? I've got a System.Windows.Forms.UserControl that products events which I want to consume (sink) within Internet Explorer. I'm following the instructions at:...
3
11484
by: laredotornado | last post by:
Hi, This problem only affects PC IE. On a secured page (a page visited via https), there is a link that reads -- "Download HTML File". The link connects to this page <?php require("../../util_fns.php"); session_start();
9
7714
by: Etayki | last post by:
Hi! I am new to VB.net and I am using the Visual Basic 2005 Express Edition I have two questions: 1. I am trying to write an application that will automate Internet Explorer and store data in a database. Am I better off learning VB.net or C#.net? Is there a free development environment for C# as well?
1
7430
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/scripts/demo/download2.php Whenever I get that page, I get the following error: --------------------- Internet Explorer cannot download download2.php from www.frostjedi.com. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try
0
7504
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7435
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7792
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5360
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3491
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3470
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1046
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.