Managed C++ control in Internet Explorer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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.
--------------------
 
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#WindowsControlLibrary1.UserControl1
height=480 width=640 VIEWASTEXT>

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

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

Kind Regards,

Paul
 
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
 
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.
 
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.
--------------------
 
Back
Top