You asked a somewhat rhetorical / philosophical question.  If you have a specific 
question about how to do something, please make the question more obvious.

You didn't say what you're trying to do, but I guess you're trying to "host" mshtml in 
a (.NET?) program of yours.  Are you writing a Windows Forms app?

OLE as an acronym has been dead for a long time.  COM and ActiveX are the current 
names for the technologies that OLE/OLE2 represent.  If you want to call pre-.NET code 
in a .NET app, you need to use the technology that MS has told us to use to do that 
bridging -- that technology is COM.  (ActiveX is really just a set of standardized 
interfaces for working with COM.)

If you're writing a component that you want to be usable within environment X, you 
need to follow the rules that environment X imposes upon you.  VB, and many other 
environments, are most functional if your component is an ActiveX Control that 
implements the interfaces you mention.  Your component won't work properly in such an 
environment unless it implements those interfaces.

If you're trying to "host" a control (of any kind), you need to write in, or emulate, 
the environment for which the control was written.  If you want to host an ActiveX 
Control, you need to be an ActiveX Host -- which is automatic if you use VB, 
distinctly non-trivial if you write in naked C++, made somewhat reasonable in C++ by 
ATL, not very hard if you use Delphi, and so on.

At 12:47 AM 1/18/2004, Avi Nahir wrote
>I thought this beast was dead!
>
>Lately, however, I've been using itwriting's HtmlEditor control. It
>appears that this contorl is all about OLE2 interfaces: IOleClientSite,
>IOleContainer, IDocHostUIHandler, IOleInPlaceFrame, IOleInPlaceSite and
>IOleDocumentSite (see  Tim Anderson's "When .Net and COM meet" at
>www.appdevadvisor.co.uk/Downloads/ADA7_1/Anderson7_1.pdf).
>
>Now, I understand that when you'r messing with an existing component such
>as mshtml you have to play by its rules. My question, however, is about
>the architecture: Should OLE  still be used in today's new components? If
>not, what replaces it?

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to