Mshtml component reference

Source: Internet
Author: User

An htmleditor and winform program is applied in a system. Microsoft. mshtml. dll must be referenced.
Therefore, this file under. net is referenced. Add reference>. net> select Microsoft. mshtml.

The development process is complete without any problems. However, when deployed to another machine, the referenced Microsoft. mshtml. dll cannot be found. There are no files similar to mshtml. dll in the program directory.

It seems that Microsoft. mshtml. dll has a problem. Search for it online:
Get the following article: What is Microsoft. mshtml? Http://www.cnblogs.com/waxdoll/archive/2005/04/08/134196.html)

Read carefully: there was a reference to mshtml in the COM component reference. There are two mshtml in total. (Referenced in the following Original article ):
. NET system comes with an mshtml. in theory, the Interop encapsulation of dll cannot be separated from COM, but since it is encapsulated by Interop. the use of the. NET environment is definitely better than calling the COM component directly.

At first, I thought about copying Microsoft. mshtml. dll to the program directory on drive C. I searched for it and found that the problem was serious. This is a 2.98 MB big guy. But can I not reference this?
Fortunately, two other good things appeared during the search: WindowsLive. Writer. Interop. Mshtml. dll (165 k) and WindowsLive. Writer. Mshtml. dll (113 k ).

Therefore, the Microsoft. mshtml. dll reference is deleted in the program, and the dll reference of K is replaced. After changing to WindowsLive. Writer. Interop. Mshtml. dll (165 k), you can finally succeed. Well, mshtml. dll with this small block header can replace the Microsoft. mshtml. dll of 3 m, which is good and good.

Then, open the Object Browser and compare the two dll files. As expected, the small dll is also an encapsulation for mshtml COM. WindowsLive. Writer. Interop. Mshtml. dll is in Live Writer. LiveWriter also has an htmleditor, which is similar to the htmleditor I use now.

I posted my blog and forwarded it here.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.