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/