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.