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 / .NET Framework / Interop / August 2003

Tip: Looking for answers? Try searching our database.

Translate COM interface

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Franz - 22 Aug 2003 16:06 GMT
Actually I want to access the IHtmlDocument2Ptr interface, but I find that I can't add mshtml.dll as a reference. Therefore I think
I have to translate the COM interface(which is inside mshtml.h) to C#. But it is very complicate to translate, because it contains
other inferfaces and many methods as well. Is translation of COM interface the only method to access that? Do I need to translate
all the methods? Can I translate those I use only? Thanks.
I got a similar problem when I want to access ShellLink.
Any ideas and articles are appreciated

--
My C++ and C# ( Traditional Chinese ) Web Site : www.franzwong.com
Charles Law - 22 Aug 2003 17:27 GMT
Hi Franz

When you say that you cannot add mshtml.dll as a reference, what is it that
prevents you from doing this? You should be able to, in which case you would
not need to define all the interfaces by hand.

If you cannot find the reference, look for Microsoft.mshtml.

HTH

Charles

> Actually I want to access the IHtmlDocument2Ptr interface, but I find that I can't add mshtml.dll as a reference. Therefore I think
> I have to translate the COM interface(which is inside mshtml.h) to C#. But it is very complicate to translate, because it contains
[quoted text clipped - 5 lines]
> --
> My C++ and C# ( Traditional Chinese ) Web Site : www.franzwong.com
Franz - 22 Aug 2003 18:44 GMT
When i add the mshtml.dll, it pops up a dialog box saying it is not a valid COM object.
Finally, I can add that successfully by adding mshtml.tlb instead.
But I am still interested in the question I asked.
Do I need to translate all the methods?
Can I just translate the methods I want?

--
My C++ and C# ( Traditional Chinese ) Web Site : www.franzwong.com

"Charles Law" <law.ck@btinternet.com> ???g???l???s?D:ez5QXpMaDHA.388@TK2MSFTNGP10.phx.gbl...
> Hi Franz
>
[quoted text clipped - 20 lines]
> > --
> > My C++ and C# ( Traditional Chinese ) Web Site : www.franzwong.com
Mike - 22 Aug 2003 21:41 GMT
microsoft.mshtml is included in the framework, and it's
about 7.6mb. I think trying to write your own wrapper for
mshtml might be too complicated to be worth it. The fact
that microsoft.mshtml is on all computers with the
framework, that's less they have to install.

>-----Original Message-----
>When i add the mshtml.dll, it pops up a dialog box saying it is not a valid COM object.
[quoted text clipped - 7 lines]
>
>"Charles Law" <law.ck@btinternet.com>
¼¶¼g©ó¶l¥ó·s»D:ez5QXpMaDHA.388@TK2MSFTNGP10.phx.gbl...
>> Hi Franz
>>
[quoted text clipped - 22 lines]
>
>.
Franz - 23 Aug 2003 09:01 GMT
in the framework? Do you mean the ".NET Framework? If yes, how can I find it?

--
My C++ and C# ( Traditional Chinese ) Web Site : www.franzwong.com

"Mike" <mike@workflow.com> ???g???l???s?D:026601c368ed$c0ef6c40$a601280a@phx.gbl...
microsoft.mshtml is included in the framework, and it's
about 7.6mb. I think trying to write your own wrapper for
mshtml might be too complicated to be worth it. The fact
that microsoft.mshtml is on all computers with the
framework, that's less they have to install.

>-----Original Message-----
>When i add the mshtml.dll, it pops up a dialog box
saying it is not a valid COM object.
>Finally, I can add that successfully by adding
mshtml.tlb instead.
>But I am still interested in the question I asked.
>Do I need to translate all the methods?
>Can I just translate the methods I want?
>
>--
>My C++ and C# ( Traditional Chinese ) Web Site :
www.franzwong.com

>"Charles Law" <law.ck@btinternet.com>
???g???l???s?D:ez5QXpMaDHA.388@TK2MSFTNGP10.phx.gbl...
>> Hi Franz
>>
>> When you say that you cannot add mshtml.dll as a
reference, what is it that
>> prevents you from doing this? You should be able to,
in which case you would
>> not need to define all the interfaces by hand.
>>
>> If you cannot find the reference, look for
Microsoft.mshtml.

>> HTH
>>
>> Charles
>>
>> > Actually I want to access the IHtmlDocument2Ptr
interface, but I find that
>> I can't add mshtml.dll as a reference. Therefore I
think
>> > I have to translate the COM interface(which is
inside mshtml.h) to C#. But
>> it is very complicate to translate, because it contains
>> > other inferfaces and many methods as well. Is
translation of COM interface
>> the only method to access that? Do I need to translate
>> > all the methods? Can I translate those I use only?
Thanks.
>> > I got a similar problem when I want to access
ShellLink.
>> > Any ideas and articles are appreciated
>> >
>> > --
>> > My C++ and C# ( Traditional Chinese ) Web Site :
www.franzwong.com

>.
Vadim Melnik - 24 Aug 2003 08:18 GMT
Hi,

> in the framework? Do you mean the ".NET Framework? If yes, how can I find it?

On my PC it's under "C:\Program Files\Microsoft.NET\Primary Interop
Assemblies\Microsoft.mshtml.dll".

Normaly Microsoft.mshtml PIA should be available in the ".NET" tab of "Add
Reference" dialog.

..
Regards,
Vadim.

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.