By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,255 Members | 2,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,255 IT Pros & Developers. It's quick & easy.

Managed C++ control in Internet Explorer

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.