Winform references mshtml Assembly)

Source: Internet
Author: User

Recently I made a Unicom number queryProgramBecause it is an automatic query, You Need To screen the JS pop-up prompt box on the webpage page to avoid program suspension, So Microsoft mshtml is referenced. DLL assembly, after the program is released, it is found that it can only be installed on machines with the vs runtime environment, and machines without this environment will receive an error message indicating that the Microsoft mshtml assembly is missing and cannot be installed, after finding some information on the Internet and finally solving the problem, I will write down the process and share it with you:

Because Microsoft. mshtmal. DLL. This dll is from the mshtml In the System32 folder. TLB (com-type library file), so we only need to use the tlbimp.exe com-Type Library export tool that comes with vs2008 to export this TLB file again. Use the following script to export data:

Tlbimp mshtml. TLB/out: mshtml. dll

Finally, an mshtml is obtained. DLL Assembly file. mshtmal. replace DLL with mshtml. DLL, and then the DLL can be added to the installation project.

Specific Method: "Start" | "program" | "vs 2008" | "vs Tools" | "vs command prompt" input: tlbimp mshtml. TLB/out: c: \ windows \ system32 \ mshtml. DLL after running is complete, find: D: \ Program Files \ Microsoft Visual Studio 9.0 \ Vc \ mshtml in the disk area where vs is installed (my security is in D. DLL replaces the original program reference set Microsoft. mshtmal. DLL.

 

 

// Note: every time you reinstall the mshtml. dll system, you must use the above method to regenerate the mshtml. dll so that it can be deployed to the client without any problems.

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.