473,322 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Managed C++ control in Internet Explorer

I'm having difficulty embedding a managed C++ control in Internet Explorer.
I'm using the same object syntax in the html as I would for a c# control,
but IE doesn't seem to find the control in the dll. Is there a different
object syntax used to identify a control in a managed c++ dll?

Thanks,

Paul
Nov 17 '05 #1
5 1325
Hi Paul,
Is there a different object syntax used to identify a control in a managed

c++ dll?

..there is no special syntax to embed a managed c++ control in a HTML
page, the syntax is not dependent on the language that maked the control.

and how is your managed c++ control? Is it an ActiveX control or a WinForm
control, do you have test it in ActiveX Test Control Container or a WinFrom
application?

By the way, if it is a WinForm Control, the running environment should have
installed the .NET framework and the IE version need above 5.0...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Nov 17 '05 #2
Hi Gary,

Thanks for the reply. The managed c++ control is a WinForm control. I
reduced it down to creating a C++ .NET control library project in VS.NET
2003, adding a couple of buttons, compiling and placing the resulting dll in
the same directory as my html page. Doing it as a C# control works fine,
the html looks like this:

<object id=TestControl
classid=http:WindowsControlLibrary1.dll#WindowsCon trolLibrary1.UserControl1
height=480 width=640 VIEWASTEXT>

In managed C++ the naming I think I need would be:
<object id=TestControl
classid=http:WindowsControlLibrary1.dll#WindowsCon trolLibrary1::UserControl1
height=480 width=640 VIEWASTEXT>

But it doesn't work. The test system is WinXP, .net 1.1 ie 6.

Kind Regards,

Paul

""Gary Chang"" <v-******@online.microsoft.com> wrote in message
news:SU*************@cpmsftngxa10.phx.gbl...
Hi Paul,
Is there a different object syntax used to identify a control in a
managed c++ dll?

.there is no special syntax to embed a managed c++ control in a HTML
page, the syntax is not dependent on the language that maked the control.

and how is your managed c++ control? Is it an ActiveX control or a WinForm
control, do you have test it in ActiveX Test Control Container or a WinFrom application?

By the way, if it is a WinForm Control, the running environment should have installed the .NET framework and the IE version need above 5.0...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights. --------------------

Nov 17 '05 #3
This is an issue for me currently . It might have to with the security
settings of the local machine.

Unfortunately the c++ complier cannot produce "verifiable" assemblies. The
clr performs this check during JIT compilation. Verification is required by
default for most zones. This I think is a good thing.

Anyway depending on where you are loading your control from ( internet,
intranet, etc. ) you will have to increase the security settings to full
trust. You can perform this task using the .NET configuration tools.

NOTE: I understand that there is a way to set the policy for a single
assembly but I have not had any luck with it so far. What I am suggesting
will open up the door for ALL assemblies to run pretty much unrestricted. It
will, however, allow you to develop your control until a proper solution is
found. I guess what I am trying to say is that this will need to be fixed
before deploying your control into production.

Hope this helps somewhat.

George Economos
<pa**@palmnospam.com> wrote in message
news:OS**************@TK2MSFTNGP12.phx.gbl...
Hi Gary,

Thanks for the reply. The managed c++ control is a WinForm control. I
reduced it down to creating a C++ .NET control library project in VS.NET
2003, adding a couple of buttons, compiling and placing the resulting dll in the same directory as my html page. Doing it as a C# control works fine,
the html looks like this:

<object id=TestControl
classid=http:WindowsControlLibrary1.dll#WindowsCon trolLibrary1.UserControl1 height=480 width=640 VIEWASTEXT>

In managed C++ the naming I think I need would be:
<object id=TestControl
classid=http:WindowsControlLibrary1.dll#WindowsCon trolLibrary1::UserControl1 height=480 width=640 VIEWASTEXT>

But it doesn't work. The test system is WinXP, .net 1.1 ie 6.

Kind Regards,

Paul

""Gary Chang"" <v-******@online.microsoft.com> wrote in message
news:SU*************@cpmsftngxa10.phx.gbl...
Hi Paul,
Is there a different object syntax used to identify a control in a managed
c++ dll?

.there is no special syntax to embed a managed c++ control in a HTML
page, the syntax is not dependent on the language that maked the

control.
and how is your managed c++ control? Is it an ActiveX control or a WinForm control, do you have test it in ActiveX Test Control Container or a

WinFrom
application?

By the way, if it is a WinForm Control, the running environment should

have
installed the .NET framework and the IE version need above 5.0...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.
--------------------


Nov 17 '05 #4
Thanks for replying. I'm thinking that I may be better off waiting until
the managed C++ overhaul in VS2005, presumably it will fix this? The
production environment is over 2000 desktops, so I would prefer not to have
an upgrade that could potentially cause security issues.

"George Economos" <no****@hatespammers.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
This is an issue for me currently . It might have to with the security
settings of the local machine.

Unfortunately the c++ complier cannot produce "verifiable" assemblies. The clr performs this check during JIT compilation. Verification is required by default for most zones. This I think is a good thing.

Anyway depending on where you are loading your control from ( internet,
intranet, etc. ) you will have to increase the security settings to full
trust. You can perform this task using the .NET configuration tools.

NOTE: I understand that there is a way to set the policy for a single
assembly but I have not had any luck with it so far. What I am suggesting
will open up the door for ALL assemblies to run pretty much unrestricted. It will, however, allow you to develop your control until a proper solution is found. I guess what I am trying to say is that this will need to be fixed
before deploying your control into production.

Hope this helps somewhat.

George Economos
<pa**@palmnospam.com> wrote in message
news:OS**************@TK2MSFTNGP12.phx.gbl...
Hi Gary,

Thanks for the reply. The managed c++ control is a WinForm control. I
reduced it down to creating a C++ .NET control library project in VS.NET
2003, adding a couple of buttons, compiling and placing the resulting dll
in
the same directory as my html page. Doing it as a C# control works fine, the html looks like this:

<object id=TestControl

classid=http:WindowsControlLibrary1.dll#WindowsCon trolLibrary1.UserControl1
height=480 width=640 VIEWASTEXT>

In managed C++ the naming I think I need would be:
<object id=TestControl

classid=http:WindowsControlLibrary1.dll#WindowsCon trolLibrary1::UserControl1
height=480 width=640 VIEWASTEXT>

But it doesn't work. The test system is WinXP, .net 1.1 ie 6.

Kind Regards,

Paul

""Gary Chang"" <v-******@online.microsoft.com> wrote in message
news:SU*************@cpmsftngxa10.phx.gbl...
Hi Paul,

>Is there a different object syntax used to identify a control in a

managed
c++ dll?

.there is no special syntax to embed a managed c++ control in a HTML
page, the syntax is not dependent on the language that maked the

control.
and how is your managed c++ control? Is it an ActiveX control or a WinForm control, do you have test it in ActiveX Test Control Container or a

WinFrom
application?

By the way, if it is a WinForm Control, the running environment should

have
installed the .NET framework and the IE version need above 5.0...
Thanks!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no

rights.
--------------------



Nov 17 '05 #5
Hi Paul,

Thanks for your quickly response!
... I'm thinking that I may be better off waiting until
the managed C++ overhaul in VS2005, presumably it will fix this?The
production environment is over 2000 desktops, so I would prefer not to have an upgrade that could potentially cause security issues.


We do understand your concern on this scenario, it really would bring some
troubles to the MC++ developers. We will pass your feedback to VC dev team.
Thanks for your understanding!

Best regards,

Gary Chang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

Nov 17 '05 #6

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

Similar topics

0
by: Colin Graham | last post by:
I am creating an install disk in visual studio dotnet to install an application. As part of the install i need to allow access to a website. At present i have to do this manaully by adding the...
2
by: Peter Schmitz | last post by:
Hi, I have the following task to achieve: I need to be able to view and edit an XML document (*.xml) in a proper way in my vb .net application. But, when I just load the file into a multiline...
2
by: Neil | last post by:
Is there an editable RTF textbox control which allows the user to apply bold, italic, etc.? I tried the Microsoft Rich Textbox Control, but there doesn't seem to be a way to allow the user to...
0
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. ...
5
by: Gerhard Menzl | last post by:
When creating a Managed C++ DLL using the Visual Studio 7.1 Solution Explorer (by selecting Add New Project and then either choosing Class Library (.NET) or Windows Control Library (.NET)), the IDE...
2
by: Filippo Bettinaglio | last post by:
Hi, I use, VS2005 C# I have a Windows Forms UserControl hosted within Internet Explorer According to MIcrosoft documentation: ...
1
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...
3
by: Erakis | last post by:
Hi, I have to make an ActiveX (Running on Internet Explorer) that play/record sound from soundcard. Also, I have to create a Socket to send/receive sound data to my server. I use this...
0
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.