Re: Managed C++ control in Internet Explorer

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: George Economos (nospam_at_hatespammers.com)
Date: 06/24/04


Date: Thu, 24 Jun 2004 07:33:31 -0400

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

<paul@palmnospam.com> wrote in message
news:OSExcJdWEHA.2844@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#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
>
> ""Gary Chang"" <v-garych@online.microsoft.com> wrote in message
> news:SUrTQAdWEHA.308@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.
> > --------------------
> >
>
>


Quantcast