Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / June 2004

Tip: Looking for answers? Try searching our database.

Managed C++ control in Internet Explorer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
- 24 Jun 2004 04:55 GMT
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
"Gary Chang" - 24 Jun 2004 10:45 GMT
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

Signature

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

--------------------
- 24 Jun 2004 11:00 GMT
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

> Hi Paul,
>
[quoted text clipped - 21 lines]
> This posting is provided "AS IS" with no warranties, and confers no rights.
> --------------------
George Economos - 24 Jun 2004 12:33 GMT
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
> Hi Gary,
>
[quoted text clipped - 5 lines]
>
> <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>
>
[quoted text clipped - 33 lines]
> rights.
> > --------------------
- 29 Jun 2004 02:21 GMT
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.

> This is an issue for me currently . It might have to with the security
> settings of the local machine.
[quoted text clipped - 28 lines]
> >
> > <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>
> >
[quoted text clipped - 35 lines]
> > rights.
> > > --------------------
"Gary Chang" - 29 Jun 2004 04:19 GMT
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

Signature

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

--------------------

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.