What is Microsoft. mshtml?

Source: Internet
Author: User
What is MSHTML? It is getting confused now.

Lostinet references the MSHTML (COM component) in the example given in the document used in combination with MSHTML and WebBrowser to generate beautiful and practical WinForm applications)

In this regard, I mentioned in the reference article of the mshtml component that it can be referenced. net Component Microsoft. mshtml, Mu yehu raised an objection to this. I haven't figured it out yet. Today I have encountered a real problem:

A small program runs normally on the WinXP operating system (the computer is installed with Visual Studio. net, note that not only.. Net Framework), only installed on the other two. net Framework Win2000 operating system running on the computer, the MSHTML format encountered the following error prompt:

(The Ghost knows what this prompt is, and the prompt information is not detailed at all ......)

After analysis, it is determined that the problem is MSHTML. However, I found that no Microsoft. mshtml. dll exists in the program running directory, and the same is true for referencing COM components (MSHTML). No dll file in the program running directory is about mshtml.

Run the "DLL \ Program. local" empty file according to the method used to implement parallel component sharing (extended) in the application.

Then, if you delete any reference to the mshtml component in the project, copy a copy of Microsoft. mshtml. dll file to the program running directory, directly add reference to the dll file, the program also runs normally.

Oh, My God! What is MSHTML? Generally, the COM component automatically copies the dll file to the program running directory?

In fact, Microsoft. mshtml. dll in the System Path: \ Program Files \ Microsoft. net \ Primary Interop Assemblies \ directory (found in the reply to wooye HU), originally, Visual Studio. NET installer automatically registers and installs the primary Interop Assembly of General COM components such as ADO and MSHTML. NET Framework provides an optimized Runtime Library callable encapsulation container (RCW ).

In this way, we should try to use primary Interop Assembly when referencing MSHTML, because it carries the COM component publisher's digital signature.

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

In addition, I have seen a previous error on the Internet and have not found a solution, but I forgot where I saw it. I hope he can see this article.

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.