MSXML. dll error cannot be found on Windows 7 after the XP project is transplanted.

Source: Internet
Author: User

Microsoft MSXML is used to parse XML files. When using XML files in XP, you only need to # import <MSXML. dll> to compile the file,

MSXML. dll cannot be found when the project is transplanted to Vista.

On Vista, MSXML. dll was upgraded to msxml6.dll,

Change # import <MSXML. dll> to # import <msxml6.dll>.

Change Using namespace MSXML to using namespace msxml2 for compilation.

Can the compiled executable files under vista not be used in XP?

The following methods are available on the Internet:
# If (_ win32_winnt> = 0x0600)
# Import <msxml6.dll>
# Else
# Import <MSXML. dll>
# Endif

This approach is unnecessary.

The following is an explanation provided by a netizen:

The usage of COM components, development environment and running environment are different. The development environment must use the latest SDK to support the latest operating system. Therefore, you must use # import msxml6.dll, but in the running environment,ProgramMsxml6.dll is not loaded directly, but is loaded through cocreateinstance. The progid or CLSID is passed, and the system will find the corresponding DLL file in the registry. If it is running under Vista, the system will help you load msxml6.dll. In the XP environment, the system will help you load MSXML. DLL. However, the program cannot use ixmldocument6, because MSXML. dll does not support this version in the XP environment.

This feature is the most basic feature of COM: To maintain binary compatibility, even if the component version is upgraded, the old version of the program can be run in the new environment, because the new version of the component will certainly retain the interface of the old version of the component.

 

Http://sites.securepaynet.net/

 

 

 

Related 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.