VB 32-bit program in 64-bit system to appear file and registry automatic steering Solution _vb

Source: Internet
Author: User

Normally written in VB program on the 32-bit system can be normal operation, but in the 64-bit system, although it can run but cannot modify OEM information. Looking for the reason can be found, when we access the folder "SYSTEM32" when the system will automatically turn to the folder "SYSWOW64", when we access certain registry key values, and the file to turn similar, the system will automatically turn the program access to the Wow6432node below.

First to talk about the file system, looking for some information, and no VB-related data, but can find 2 related functions: Wow64disablewow64fsredirection (Turn off system steering) and wow64revertwow64fsredirection (Turn on system turn).
VB's statement is as follows:

Private Declare function Wow64revertwow64fsredirection Lib "kernel32.dll" ()
private Declare function Wow64disablewow64fsredirection Lib "Kernel32.dll" ()

Then use the call Wow64disablewow64fsredirection statement to turn off the file system.

Let's talk about the turning of the registry key:

This still does not have the VB aspect data, but knows has the function Regopenex (VB has this function, the usage see API browser) may decide whether to turn, as long as the function samdesired "long" the parameter to add 256 (& H100), you can access the 64-bit registry. Because the API access to the registry code is more than posted.

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.