473,785 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

COM Interop messes with IE hosted windows forms control

Hi

I have a windows forms user control that is hosted in IE. This control
uses COM Interop to access some RTC related interfaces. The control
does not display itself correctly because of this COM reference. IF I
remove all references to the tlbimp'ed COM dll, the control displays
just fine. Basically a plain vanilla user control has no problems
displaying itself.

Upon further investigation with fuslogvw, I found out that the MSHTML
component is not getting loaded whenever I leave the COM referencing
code inside my control.

What am I doing wrong?

thanks
--Dilip

Nov 19 '05 #1
3 1532
I would think that there is a problem with the COM references then. The user
control cannot load the DLL, so it "bombs" and doesn't display anything. Is
the ASP.NET site compiled? Does the site have access to the COM .DLL file
when it tries to load the page? Have you attempted to walk through a page
load with the debugger?
"Dilip" <rd*****@lycos. com> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.com.. .
Hi

I have a windows forms user control that is hosted in IE. This control
uses COM Interop to access some RTC related interfaces. The control
does not display itself correctly because of this COM reference. IF I
remove all references to the tlbimp'ed COM dll, the control displays
just fine. Basically a plain vanilla user control has no problems
displaying itself.

Upon further investigation with fuslogvw, I found out that the MSHTML
component is not getting loaded whenever I leave the COM referencing
code inside my control.

What am I doing wrong?

thanks
--Dilip

Nov 19 '05 #2

Steve Lutz wrote:
I would think that there is a problem with the COM references then. The user control cannot load the DLL, so it "bombs" and doesn't display anything. Is the ASP.NET site compiled? Does the site have access to the COM .DLL file when it tries to load the page? Have you attempted to walk through a page load with the debugger?


I am sure there is nothing wrong with finding the references. I have
tlbimp'ed the original COM tlb and linked my .NET application with it.
In fact the windows forms control, the tlbimp'ed dll and a .manifest
file are all in the same directory (\inetpub\wwwro ot). As I said, when
I look at fuslogvw, I can see the DLLs getting loaded properly. Its
just that the control doesn't render itself on the web page. It
_could_ be because I am making calls to unmanaged code in the control's
ctor and the control is not given access to call unmanaged code. The
thing is I don't understand how to set this permission.
Some help would be greatly appreciated.

Nov 19 '05 #3
Actually I have now found out what the problem is. My winforms user
control actually has a manifest file that indicates which version of
the COM DLL to load (the dll in question is Rtcdll.dll specified in the
<dependantassem bly> section). Apparently this manifest file is never
being referred to -- consequently calls to methods on a specific
interface fails. The same code works as a stand alone app where the
manifest file is not ignored.
How do I ensure that the manifest file is not ignored?

Nov 19 '05 #4

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

Similar topics

0
2230
by: Jeff M | last post by:
For my application an activeX refers to "program displayed within Internet Explorer" After looking over the docs for VB.NET it looks impossible. ---START--- USERCONTROL CHANGES IN VISUAL BASIC .NET In Visual Basic 6.0, UserControl projects (also known as ActiveX Control projects) were used to create ActiveX controls. After they were compiled,
0
3256
by: Grant | last post by:
I've cross-posted this in the COM+ group as well - apologies if that's a no-no. But the problem might be caused by either... interop or just plain COMAdmin. ============================================= I've got a VB.NET app that is trying to access the Component Services catalog. The first class method installs a new component at a specified location. The second method searches for a specified component and deletes it.
5
1853
by: Dan Smith | last post by:
Right now the only way to use a WinForms control in MFC is to enable COM Interop for the control and use it in MFC as you would any ActiveX control. While this works, COM Interop is a pain, and an ActiveX control isn't as straight-forward as a CWnd-derived object. It also means that I have to split my code into two projects. Going the other way (using MFC in WinForms) is only possible by exposing MFC objects as ActiveX controls, which...
2
1883
by: Matt Theule | last post by:
I need to be able to allow users to drag files to a list box on a web page. To this end, I created a Windows Control and hosted it in a WebForm. When the file is dropped onto the listbox, the path of the file is truncated down to 8.3 format (with the ~1 at the end). When the Windows control is hosted in a windows form (for testing purposes) the full path is displayed. Is there some setting that will allow the full path to be displayed...
4
5672
by: john | last post by:
I'm having some Interop problems. I really need someone's help on this, i'm running out of ideas. I have upgraded my Data access controls to the latest ver. Now then i have a form with these ref's: Interop.DAO,System,System.Data,System.Drawing,System.windo ws.forms,System.XML. all that's on this form is a button and when the button is clicked it opens up a fox pro database and gets the needed info/close. Now this works just fine on my
1
1570
by: Lloyd Sheen | last post by:
I have the following situation: Need a user resizable user control. After much trying with user control I came across the idea of hosting the controls in a form marked as not TopLevel = false. This work fine for most cases, allowing the user to resize the form (and controls within the form. The forms them selves are create dynamically when the user drags a node from a listview to a panel (contained in a Usercontrol which is hosted by...
5
4098
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in both projects. Both controls(dlls) have been signed using SN.exe and I've set up the appropriate .Net assembly permissions using those Strong Names The DLL's have been copied to the /bin directory in both web virtual directories.
0
2159
by: Filippo Bettinaglio | last post by:
Security problem running unmanaged code (.ocx control) in a windows from control hosted in IE6 Hi, I have design a windows from control which contain a .OCX in one of its forms. Component developed in C#2005 -------- .NET2
0
1141
by: Kaysetoaster | last post by:
Hi Gurus I wrote a "Active X" UserControl DLL in VB.NET and placed it on a iis 6 webserver. I embeded it with the object tag and the communication to functions and propertys in the vb.net control works great. As A reference I added the COM component UIRESOURCELib.dll in the Visual Studio 2005. When the DLL starts the functions from the UIRESOURCELib, i get the following error in the IE7 ************** Exception Text **************...
0
9647
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10163
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.